Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create, modify and access different resources/objects of the building model using the Bimplus api

Create a project, add some objects(walls, columnsan object(wall) and view it using the web viewer

...

Anchor
storyCreateProject
storyCreateProject

Create a project, add

...

an object(wall) and view it using the web viewer

Gliffy Diagram
sizeL
nameUS_Create_Project

...

2. Create a model under the project

 

Create a new model

...

  
Deck of Cards
idbimCreateModel
Card
labelHTTP Method
 POST
Card
defaulttrue
labelURL / Resource / JSON Structure
 

Resource: divisions 

URLhttps://api-stage.bimplus.net/v2/<team_slug>/projects/<project_id>/divisions

Examplehttps://api-stage.bimplus.net/v2/bimplus/projects/69e48f92-a8dc-4af5-8f71-187b40a8b8f5/divisions

JSON Structure

Name

Mandatory / Optional

Type

Description

name

mandatory

string

Name of the model

description

optional

string

Short description of the model

projectId

will be ignored

string (guid)

Id of the project to which the model belongs

topologyIdoptionalstring (guid)Id of the topology to which the model belongs
disciplinesoptionalobjectThe discipline list of the model
Card
labelDescription
 Creates a new model.
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
titleJSON
langxml
{
"name" : "Nemetschek Building",
"shortDescr" : "Model created via API"
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 201 Created
Code Block
borderColorRed
titleJSON
langxml
{
    "name": "Nemetschek Building",
    "description": null,
    "projectId": "69e48f92-a8dc-4af5-8f71-187b40a8b8f5",
    "id": "4496b8ad-ba5a-483c-9912-2cb837178708"
}

...

Deck of Cards
idbimGetObject1
Card
labelHTTP Method
 POST
Card
labelURL / Resource / JSON Structure
 Resource: objects 

URLhttps://api-stage.bimplus.net/v2/<team>/objects

Examplehttps://api-stage.bimplus.net/v2/bimplus/objects

JSON Structure:

Name

Mandatory / Optional

Type

Description

parent

optional

string (guid)

The id of the parent to which the object can be associated

type

mandatory

string

Element type of the object

attributes

optional

string

Attributes of the object

children

optional

Object

Children of the object

Card
labelDescription
 Creates a new object
Card
defaulttrue
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
titleJSON
langxml
{
    "parent": "69e48f92-a8dc-4af5-8f71-187b40a8b8f5",
    "type": "TopologyDivision",
    "attributes": {
        "element": {
            "isparent": true,
            "elementtyp": "e003e080-f21b-4f8a-8c4c-4c9c5026cf50",
            "divisionid": "4496b8ad-ba5a-483c-9912-2cb837178708"
        },
        "general": {
            "name": "created by objects post",
            "isobjectvalid": true
        }
    }
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 201 Created
Code Block
borderColorRed
titleJSON
langxml
{
    "id": "b793c860-d3b8-48a5-aa42-9df9e24a0d71",
    "parent": "69e48f92-a8dc-4af5-8f71-187b40a8b8f5",
    "type": "TopologyDivision",
    "attributes": {
        "element": {
            "isparent": true,
            "elementtyp": "e003e080-f21b-4f8a-8c4c-4c9c5026cf50",
            "divisionid": "4496b8ad-ba5a-483c-9912-2cb837178708",
            "logparentid": "69e48f92-a8dc-4af5-8f71-187b40a8b8f5"
        },
        "general": {
            "name": "created by objects post",
            "isobjectvalid": true
        }
    }
}

...

4. Add a wall to the project

Again we use the Bimplus Object Service for creating the wall object in the project. Please note that the wall is added to the topology node and not the project (i.e See the request tab. The id of the topology node is provided for the parent attribute of the json object(wall))

Deck of Cards
idbimGetObject1
Card
labelHTTP Method
 POST
Card
labelURL / Resource / JSON Structure
 Resource: objects 

URLhttps://api-stage.bimplus.net/v2/<team>/objects

Examplehttps://api-stage.bimplus.net/v2/bimplus/objects

JSON Structure:

Name

Mandatory / Optional

Type

Description

parent

optional

string (guid)

The id of the parent to which the object can be associated

type

mandatory

string

Element type of the object

attributes

optional

string

Attributes of the object

children

optional

Object

Children of the object

Card
labelDescription
 Creates a new object
Card
defaulttrue
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
titleJSON
langxml
{
    "parent": "b793c860-d3b8-48a5-aa42-9df9e24a0d71",
    "type": "Wall",
    "attributes": {
        "element": {
            "elementtyp": "10074eef-9418-4d64-9c6d-23932835a7f1",
            "divisionid": "4496b8ad-ba5a-483c-9912-2cb837178708"
        },
        "general": {
            "name": "a new test wall without walllayer"
        },
        "quantity": {
            "width": 100,
            "volume": 200.4
        },
        "geometry": {
            "mesh": {
                "color": 4291407461,
                "vertices": [
                    -3486.667,
                    0,
                    -3000,
                    8993.333,
                    0,
                    -3000,
                    8993.333,
                    300,
                    -3000,
                    -3486.667,
                    300,
                    -3000,
                    -3486.667,
                    0,
                    -400,
                    8993.333,
                    0,
                    -400,
                    8993.333,
                    300,
                    -400,
                    -3486.667,
                    300,
                    -400
                ],
                "faces": [
                    4,
                    3,
                    0,
                    1,
                    2,
                    4,
                    4,
                    7,
                    6,
                    5,
                    4,
                    0,
                    3,
                    7,
                    4,
                    4,
                    1,
                    0,
                    4,
                    5,
                    4,
                    2,
                    1,
                    5,
                    6,
                    4,
                    3,
                    2,
                    6,
                    7
                ]
            }
        }
    }
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 201 Created
Code Block
borderColorRed
titleJSON
langxml
{
    "id": "b2a92252-ae51-4c72-ab1e-fafa141ac54c",
    "parent": "b793c860-d3b8-48a5-aa42-9df9e24a0d71",
    "type": "Wall",
    "attributes": {
        "element": {
            "elementtyp": "10074eef-9418-4d64-9c6d-23932835a7f1",
            "divisionid": "4496b8ad-ba5a-483c-9912-2cb837178708",
            "logparentid": "69e48f92-a8dc-4af5-8f71-187b40a8b8f5"
        },
        "general": {
            "name": "a new test wall without walllayer"
        },
        "quantity": {
            "width": 100,
            "volume": 200.4
        },
        "geometry": {
            "mesh": {
                "color": 4291407461,
                "vertices": [
                    -3486.667,
                    0,
                    -3000,
                    8993.333,
                    0,
                    -3000,
                    8993.333,
                    300,
                    -3000,
                    -3486.667,
                    300,
                    -3000,
                    -3486.667,
                    0,
                    -400,
                    8993.333,
                    0,
                    -400,
                    8993.333,
                    300,
                    -400,
                    -3486.667,
                    300,
                    -400
                ],
                "faces": [
                    4,
                    3,
                    0,
                    1,
                    2,
                    4,
                    4,
                    7,
                    6,
                    5,
                    4,
                    0,
                    3,
                    7,
                    4,
                    4,
                    1,
                    0,
                    4,
                    5,
                    4,
                    2,
                    1,
                    5,
                    6,
                    4,
                    3,
                    2,
                    6,
                    7
                ]
            }
        },
        "elementstate": {
            "state": "0aaf5a1c-2453-40cb-9232-315119dd288f"
        }
    }
}

...


5. Verify whether the wall and column is added to the project

...

by seeing the object topology

For verifying whether the wall and the column Again we use the Bimplus Object Service for creating the column object in the project. Please note that the wall is added to the topology node and not the project (i.e See the request tab. The id of the topology node is provided for the parent attribute of the json object(wall))

...

idbimGetObject1
Card
labelHTTP Method
 POST

...

labelURL / Resource / JSON Structure

...

project, we have to call GET https://api-stage.bimplus.net/v2/nemetschek/objects//topology. Please note that the API call GET https://api-stage.bimplus.net/v2/nemetschek/projects/

...

/topology will only give you its children (i.e topology) details. So, if your project is very big, you can first call GET https://api-stage.bimplus.net/v2/

...

JSON Structure:

Name

Mandatory / Optional

Type

Description

parent

optional

string (guid)

The id of the parent to which the object can be associated

type

mandatory

string

Element type of the object

attributes

optional

string

Attributes of the object

children

optional

Object

Children of the object

Card
labelDescription
 Creates a new object
Card
defaulttrue
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
titleJSON
langxml
{
    "parent" : "7f76a497-e322-4b78-b820-1ce85ebc39db",
    "type": "Column",
    "attributes": {
        "element": {
            "isparent": false,
            "nr": 0,
            "matrix": "AAAAAAAA8D8AAAAAAAAAgAAAAAAAAACAINejcP1YsEAAAAAAAAAAgAAAAAAAAPA/AAAAAAAAAIAK16Nw/fy2QAAAAAAAAACAAAAAAAAAAIAAAAAAAADwPwAArkfheoS/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8D8=",
            "divisionid": "ac21b9a1-8853-4658-9fbf-0cf62340bd18"
        },
        "general": {
            "name": "BrickColumn",
            "isobjectvalid": true
        },
        "quantity": {
            "width": 115,
			"volume" : 24
        },
        "geometry": {
            "mesh": "{\"C\":0,\"V\":[3843.438,-1048.958,-1565.0,3943.438,-1048.958,-1565.0,3943.438,-948.958,-1565.0,3843.438,-948.958,-1565.0,3843.438,-1048.958,635.0,3943.438,-1048.958,635.0,3943.438,-948.958,635.0,3843.438,-948.958,635.0],\"F\":[4,3,0,1,2,4,4,7,6,5,4,0,3,7,4,4,1,0,4,5,4,2,1,5,6,4,3,2,6,7]}"
        }
    }
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 201 Created
Code Block
borderColorRed
titleJSON
langxml
{
    "id": "de5a8d7e-701f-42ff-9731-f32fb1fb767d",
    "type": "Column",
    "attributes": {
        "element": {
            "isparent": false,
            "nr": 0,
            "elementtyp": "2e308afe-d078-4c20-b53c-76b2da66d848",
            "logparentid": "0bc9e4b7-d679-43d7-86e3-0ded12fc0736",
            "divisionid": "ac21b9a1-8853-4658-9fbf-0cf62340bd18",
            "materialsurfaceid": "cdbd7fbc-0d02-4be5-adb3-04b7f0b2a638"
        },
        "general": {
            "name": "BrickColumn",
            "isobjectvalid": true
        },
        "geometry": {
            "mesh": "{\"C\":0,\"V\":[3843.438,-1048.958,-1565.0,3943.438,-1048.958,-1565.0,3943.438,-948.958,-1565.0,3843.438,-948.958,-1565.0,3843.438,-1048.958,635.0,3943.438,-1048.958,635.0,3943.438,-948.958,635.0,3843.438,-948.958,635.0],\"F\":[4,3,0,1,2,4,4,7,6,5,4,0,3,7,4,4,1,0,4,5,4,2,1,5,6,4,3,2,6,7]}"
        }
    }
}
5. Verify whether the wall and column is added to the project by seeing the object topology

For verifying whether the wall and the column is added to the project, we have to call GET https://api-stage.bimplus.net/v2/nemetschek/objects//topology. Please note that the API call GET https://api-stage.bimplus.net/v2/nemetschek/projects//topology will only give you its children (i.e topology) details. So, if your project is very big, you can first call GET https://api-stage.bimplus.net/v2/nemetschek/projects//topology nemetschek/projects//topology and get the topology id(i.e 7f76a497-e322-4b78-b820-1ce85ebc39db in our example). Using the topology id we can get the object(wall, column in our case) details using the call GET https://api-stage.bimplus.net/v2/nemetschek/objects/7f76a497-e322-4b78-b820-1ce85ebc39db/topology.

Deck of Cards
idbimGetProjectProp
Card
labelHTTP Method
 GET
Card
labelURL / Resource / JSON Structure
 Resource: objects/<object_id>/topology

URLhttps://api-stage.bimplus.net/v2/<team>/objects/<object_id>/topology

Examplehttps://api-stage.bimplus.net/v2/bimplus-gmbh/objects/0bc9e4b769e48f92-d679a8dc-43d74af5-86e38f71-0ded12fc0736187b40a8b8f5/topology

Card
labelDescription
 Get all the project properties of a project using its id.
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
defaulttrue
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK
Code Block
borderColorRed
titleJSON
langxmlxml
{
{
    "parent": null,
    "name": "Your Wonderful Model",
    "type": "ID_Project",
    "children": [
        {
            "parent": "0bc9e4b7-d679-43d7-86e3-0ded12fc0736",
        null,
    "name": "FirstYour Wonderful floorModel",
            "type": "ID_TopologyDivisionProject",
            "children": [
                {
                    "parent": "7f76a49769e48f92-e322a8dc-4b784af5-b8208f71-1ce85ebc39db187b40a8b8f5",
                    "name": "Brickwallcreated by objects post",
                    "type": "ID_ArchWallTopologyDivision",
                    "children": [],
                    "id": "921bc1f6-228a-4f79-937a-0251b60436b4"
                },
                {
                    "parent": "7f76a497b793c860-e322d3b8-4b7848a5-b820aa42-1ce85ebc39db9df9e24a0d71",
                    "name": "BrickColumna new test wall without walllayer",
                    "type": "ID_ArchColumnArchWall",
                    "children": [],
                    "id": "de5a8d7eb2a92252-701fae51-42ff4c72-9731ab1e-f32fb1fb767dfafa141ac54c"
                }
            ],
            "id": "7f76a497b793c860-e322d3b8-4b7848a5-b820aa42-1ce85ebc39db9df9e24a0d71"
        }
    ],
    "id": "0bc9e4b769e48f92-d679a8dc-43d74af5-86e38f71-0ded12fc0736187b40a8b8f5"
}
6. See your result visually by using the web viewer.

...