getProducts
Returns product data for the specified objects.
Example
Usage
const objectIds = ["object-id-1, object-id-2"];
const products = viewer3d.getProducts(objectIds);Parameters
objectIds
List of object ids to limit result, returns all products by default.
Type | Required |
|---|---|
Array[String] | No |
Return Value
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 |
Example
[
{
ifcType: "IfcWall",
modelId: "model-id",
objectId: "object-id-1",
attributes: {
GlobalId: {
ifcType: "IfcGloballyUniqueId",
type: "string",
value: "2_TmT90tD0x9tJSTsyTb1J"
}
}
},
{
ifcType: "IfcDoor",
modelId: "model-id",
objectId: "object-id-2",
attributes: {
GlobalId: {
ifcType: "IfcGloballyUniqueId",
type: "string",
value: "2_LeT78tF0x5tDSRsyHt5K"
}
}
}
];