在 Revit 表格中标记区域对象
Marking The Area objects in Sheets of Revit
我已尝试从 Revit 的 Sheets(3D 提交) 中获取 Area 个对象] 文件通过 Forge API。使用此 link GET /modelderivative/v2/designdata/{urn}/metadata/{guid of sheet}/properties
Area Information 不存在,即使我在 [=] 中添加了 area 18=]张。
我的目标是在 2D / Sheets(3D 提交) 中标记 Area。我该怎么做?
区域,我的意思是这样>> marking The Area in 2D
区域对象看起来像 Revit Room 或 Revit Zoom。如果您的缩放或房间在查看器上是可点击的,那么您可以通过 API Get Properties 获取其属性。下面是我用来存档的几个步骤,大家可以对比一下有没有漏掉的。
检查 room/area 元素在您的 Revit sheet 中是否有效。 room/area 应该被墙或 Room Separation
/Area Boundary
包围。
确保包含您的 room/area 的 sheet 包含在 Revit Publish Setting
的集合中
将配置好的RVT上传到Forge进行翻译
翻译完成后,通过Forge Viewer加载sheet视图(在本例中称为A102 - Plans
),并确保room/area元素在视图是可点击的。
通过viewer.getSelection()
检索所选room/area的objectId
。例如 objectId of the selected room/area in this view is
4089`。
调用APIGET :urn/metadata得到sheet的guid
。例如,现在是 abdacd31-f94c-e84f-9a58-4663e281d894
。
{
"data": {
"type": "metadata",
"metadata": [
{
"name": "{3D}",
"role": "3d",
"guid": "6bfb4886-f2ee-9ccb-8db0-c5c170220c40"
},
{
"name": "A102 - Plans",
"role": "2d",
"guid": "abdacd31-f94c-e84f-9a58-4663e281d894"
}
]
}
}
- 调用APIGET :urn/metadata/:guid获取该view的实例树,查看是否有我们想要的id的room/area。例如在 API 响应中名为
Kitchen & Dining 101 [857279]
且 ID 为 4089
的房间。
{
"objectid": 4084,
"name": "Rooms",
"objects": [
{
"objectid": 4085,
"name": "Bath 203 [857200]"
},
{
"objectid": 4086,
"name": "Bath 205 [857203]"
},
{
"objectid": 4087,
"name": "Bedroom 202 [857206]"
},
{
"objectid": 4088,
"name": "Entry Hall 201 [857209]"
},
{
"objectid": 4089,
"name": "Kitchen & Dining 101 [857279]"
}
]
}
- 以这种方式调用 API GET :urn/metadata/:guid/properties 来检索 room/area 的属性。例如
/modelderivative/v2/{YOUR_RVT_URN}/metadata/abdacd31-f94c-e84f-9a58-4663e281d894/properties?objectid=4089
,它的响应如下所示,那么你会在响应中看到你想要的区域。
{
"data": {
"type": "properties",
"collection": [
{
"objectid": 4089,
"name": "Kitchen & Dining 101 [857279]",
"externalId": "e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1467",
"properties": {
"Constraints": {
"Base Offset": "0.000 mm",
"Level": "Level 1",
"Limit Offset": "6500.000 mm",
"Upper Limit": "Level 1"
},
"Dimensions": {
"Area": "26.971 m^2",
"Computation Height": "0.000 mm",
"Perimeter": "29060.000 mm",
"Unbounded Height": "6500.000 mm",
"Volume": "118.317 m^3"
},
"Identity Data": {
"Base Finish": "",
"Ceiling Finish": "",
"Comments": "",
"Department": "",
"Floor Finish": "",
"Image": "",
"Name": "Kitchen & Dining",
"Number": "101",
"Occupancy": "",
"Occupant": "",
"Wall Finish": ""
},
"Phasing": {
"Phase": "Working Drawings"
}
}
}
]
}
}
希望对你有帮助~
我已尝试从 Revit 的 Sheets(3D 提交) 中获取 Area 个对象] 文件通过 Forge API。使用此 link GET /modelderivative/v2/designdata/{urn}/metadata/{guid of sheet}/properties
Area Information 不存在,即使我在 [=] 中添加了 area 18=]张。
我的目标是在 2D / Sheets(3D 提交) 中标记 Area。我该怎么做?
区域,我的意思是这样>> marking The Area in 2D
区域对象看起来像 Revit Room 或 Revit Zoom。如果您的缩放或房间在查看器上是可点击的,那么您可以通过 API Get Properties 获取其属性。下面是我用来存档的几个步骤,大家可以对比一下有没有漏掉的。
检查 room/area 元素在您的 Revit sheet 中是否有效。 room/area 应该被墙或
Room Separation
/Area Boundary
包围。确保包含您的 room/area 的 sheet 包含在 Revit
Publish Setting
的集合中将配置好的RVT上传到Forge进行翻译
翻译完成后,通过Forge Viewer加载sheet视图(在本例中称为
A102 - Plans
),并确保room/area元素在视图是可点击的。通过
viewer.getSelection()
检索所选room/area的objectId
。例如objectId of the selected room/area in this view is
4089`。调用APIGET :urn/metadata得到sheet的
guid
。例如,现在是abdacd31-f94c-e84f-9a58-4663e281d894
。
{ "data": { "type": "metadata", "metadata": [ { "name": "{3D}", "role": "3d", "guid": "6bfb4886-f2ee-9ccb-8db0-c5c170220c40" }, { "name": "A102 - Plans", "role": "2d", "guid": "abdacd31-f94c-e84f-9a58-4663e281d894" } ] } }
- 调用APIGET :urn/metadata/:guid获取该view的实例树,查看是否有我们想要的id的room/area。例如在 API 响应中名为
Kitchen & Dining 101 [857279]
且 ID 为4089
的房间。
{ "objectid": 4084, "name": "Rooms", "objects": [ { "objectid": 4085, "name": "Bath 203 [857200]" }, { "objectid": 4086, "name": "Bath 205 [857203]" }, { "objectid": 4087, "name": "Bedroom 202 [857206]" }, { "objectid": 4088, "name": "Entry Hall 201 [857209]" }, { "objectid": 4089, "name": "Kitchen & Dining 101 [857279]" } ] }
- 以这种方式调用 API GET :urn/metadata/:guid/properties 来检索 room/area 的属性。例如
/modelderivative/v2/{YOUR_RVT_URN}/metadata/abdacd31-f94c-e84f-9a58-4663e281d894/properties?objectid=4089
,它的响应如下所示,那么你会在响应中看到你想要的区域。
{ "data": { "type": "properties", "collection": [ { "objectid": 4089, "name": "Kitchen & Dining 101 [857279]", "externalId": "e6ac360b-aaed-4c3b-a130-36b4c2ac9d13-000d1467", "properties": { "Constraints": { "Base Offset": "0.000 mm", "Level": "Level 1", "Limit Offset": "6500.000 mm", "Upper Limit": "Level 1" }, "Dimensions": { "Area": "26.971 m^2", "Computation Height": "0.000 mm", "Perimeter": "29060.000 mm", "Unbounded Height": "6500.000 mm", "Volume": "118.317 m^3" }, "Identity Data": { "Base Finish": "", "Ceiling Finish": "", "Comments": "", "Department": "", "Floor Finish": "", "Image": "", "Name": "Kitchen & Dining", "Number": "101", "Occupancy": "", "Occupant": "", "Wall Finish": "" }, "Phasing": { "Phase": "Working Drawings" } } } ] } }
希望对你有帮助~