Methods
Product
getProducts
Returns product data for the specified objects.
JS
1const objectIds = ["object-id-1, object-id-2"];
2
3const products = viewer3d.getProducts(objectIds);
List of object ids to limit result, returns all products by default.
Type | Required |
---|---|
Array[String] | No |
List of product data.
Type |
---|
Array[Object or Null] |
If any of the ids in the list are invalid, the corresponding entry in the returned list will be null.
Properties
Name | Type | Description |
---|---|---|
ifcType | String | IFC type |
modelId | String | Id of the model |
objectId | String | Id of the object |
attributes | Map[Object] | Object attributes |
attributes
Only supports attribute type of GlobalId
Type |
---|
Map[Object] |
Properties
Name | Type | Description |
---|---|---|
type | String | Type of the attribute |
ifcType | String | IFC type |
value | String | Value of the attribute |
JS
1[
2 {
3 ifcType: "IfcWall",
4 modelId: "model-id",
5 objectId: "object-id-1",
6 attributes: {
7 GlobalId: {
8 ifcType: "IfcGloballyUniqueId",
9 type: "string",
10 value: "2_TmT90tD0x9tJSTsyTb1J",
11 },
12 },
13 },
14 {
15 ifcType: "IfcDoor",
16 modelId: "model-id",
17 objectId: "object-id-2",
18 attributes: {
19 GlobalId: {
20 ifcType: "IfcGloballyUniqueId",
21 type: "string",
22 value: "2_LeT78tF0x5tDSRsyHt5K",
23 },
24 },
25 },
26];
Updated 13 Sep 2024
Did this page help you?