Extends
Classes
Methods
# activateStyleSchemaScheme(smartSetId) → {ApiResponse.<boolean>}
Activate style schema scheme.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
ID the SmartSet. |
- Since:
- 10.2025
- Overrides:
True if successfully activated.
ApiResponse.<boolean>
# activateViewpoint(objId) → {ApiResponse.<boolean>}
Activate a viewpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID |
True if viewpoint was activated.
ApiResponse.<boolean>
# async addObjectsToSmartSet(smartSetId, objIds, includeChildren) → {ApiResponse.<int>}
Add objects to SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
SmartSet ID. |
objIds |
Array.<string>
|
Object IDs. |
includeChildren |
boolean
|
true: tree structure, false: flat list |
- Since:
- 10.2025
- Overrides:
Number of added objects
ApiResponse.<int>
# addSelectionEventListener(listener) → {Promise.<null>}
add selection listener, no extra call back function
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
*
|
- Since:
- 08.12.2025, ar
- Overrides:
Promise.<null>
# addStyleSchemaToSmartSet(smartSetId, options) → {ApiResponse.<string>}
Add style to SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
ID the SmartSet. |
options |
object
|
- Since:
- 10.2025
- Overrides:
ID of newly created style.
ApiResponse.<string>
# addViewpointToSmartSet(smartSetId, options) → {ApiResponse.<status>}
Add viewpoint to SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
ID the SmartSet. |
options |
object
|
- Since:
- 10.2025
- Overrides:
ApiResponse.<status>
# addVisibilityEventListener(listener) → {Promise.<null>}
add visibility listener, no extra call back function
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
*
|
- Since:
- 08.12.2025, ar
- Overrides:
Promise.<null>
# applyStyleToObjects(styleId, objIds) → {ApiResponse.<boolean>}
Apply style to objects.
Parameters:
| Name | Type | Description |
|---|---|---|
styleId |
string
|
Style ID. |
objIds |
Array.<string>
|
Object IDs. |
True if objects style has been changed
ApiResponse.<boolean>
# async calcOptOBB(objIds) → {ApiResponse.<object>}
Calculate optimized oriented bounding boxes (OBBs) for given object IDs.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Number of affected objects
ApiResponse.<object>
# checkOverlapObjectList(idList, overlapAllowed, statusCallback) → {ApiResponse.<Array.<object>>}
Check overlap of oriented bounding boxes (OBBs) for given IDs every object against every other object. Objects having no geometry are ignored.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
idList |
Array.<string>
|
||
overlapAllowed |
number
|
0.1 | Minimum overlap to report (0.0 - 1.0), default: 0.1 |
statusCallback |
function
|
null
|
null | Optional callback function to report progress status. |
data: Array of overlapping OBB pairs. [ { id1: id1, id2: id2, maxOverlap: 0.9 }, ... ]
ApiResponse.<Array.<object>>
# async checkOverlapObjects(id1, id2) → {ApiResponse.<number>}
Calculate overlap of oriented bounding boxes (OBBs) for two given object IDs.
Parameters:
| Name | Type | Description |
|---|---|---|
id1 |
string
|
|
id2 |
string
|
max overlap. example: 0.9 for 90% overlap
ApiResponse.<number>
# connectModelViewer(on_sc, on_vc, cb) → {Object}
Connect signals selection changed and visibility changed to given functions.
Parameters:
| Name | Type | Description |
|---|---|---|
on_sc |
function
|
Function to be called on selection changed, null to disconnect |
on_vc |
function
|
Function to be called on visibility changed, null to disconnect |
cb |
*
|
{
'status' : ...
}
Object
# createModel(name, domain, settings) → {ApiResponse.<string>}
Create model. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string
|
Model name. |
domain |
string
|
Domain (e.g. 'geo') |
settings |
object
|
Model settings. |
ID of newly created model.
ApiResponse.<string>
# createObject(parentId, data) → {ApiResponse.<string>}
Create a new object. Synchronizes data with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
parentId |
string
|
ID of parent object |
data |
object
|
Data for the new object in JSON notation |
ID of newly created object.
ApiResponse.<string>
Example
{
info: {
object_type : "geo_container",
object_name : "MyObject"
},
properties: {
...
},
geometry: {
...
}
}
# createPropertyType(propData, updateExisting) → {ApiResponse.<boolean>}
Create or update property type. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
propData |
object
|
Property type definition. |
updateExisting |
boolean
|
Whether to update existing type. |
ApiResponse.<boolean>
Example
* // Example propData objects:
propData1 = {
name: "MyLength",
datatype: "xs:double",
unit: "m"
}
propData2 = {
name: "TrafficLight",
datatype: "xs:string",
values: ["red", "yellow", "green"]
readOnly: true
}
# async createSmartSet(parentId, name, objectIds, options) → {ApiResponse.<string>}
Create new SmartSet.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
parentId |
string
|
Id of parent or domain name (eDomain) for topmost |
|
name |
string
|
Name of the SmartSet. |
|
objectIds |
Array.<string>
|
List of object IDs (root nodes, children will be automatically collected). If all objects should be taken into account, use getObjectsRootId(domain) to get ID of root node of domain and add root node of domain as SmartSet Object only. To add specific objects to a SmartSet (Set by enumeration) use objects which are leafs in the object hierarchy as SmartSet Objects. |
|
options |
object
|
null
|
null | Additional options for SmartSet creation. |
- Since:
- 10.2025
- Overrides:
ID of newly created SmartSet.
ApiResponse.<string>
# createSmartSetsFromSchema(schema) → {ApiResponse.<Array.<string>>}
Create SmartSets from schema.
Parameters:
| Name | Type | Description |
|---|---|---|
schema |
object
|
Schema definition. |
Array of SmartSet IDs.
ApiResponse.<Array.<string>>
# createStyle(styleData) → {ApiResponse.<string>}
Create a new style / material.
Parameters:
| Name | Type | Description |
|---|---|---|
styleData |
object
|
Style definition. |
ID of newly created style.
ApiResponse.<string>
Example
* // Example styleData:
const styleData = {
id: "12345", // optional
name: "MyStyle", // not empty
color: "#rrggbbaa" // valid color value in hexadecimal RGBA format
}
# createViewpoint(parentId, options) → {ApiResponse.<string>}
Create a new viewpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
parentId |
string
|
null
|
ID of parent object |
options |
object
|
ID of newly created viewpoint.
ApiResponse.<string>
# deleteObjects(objIds) → {ApiResponse.<number>}
Delete objects by ID. Synchronizes data with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
IDs of objects to delete. |
Number of objects deleted.
ApiResponse.<number>
# deletePropertyType(ptKeyStr) → {ApiResponse.<boolean>}
Delete exsisting property type. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
ptKeyStr |
string
|
Access key of property type in the format name##datatype. |
ApiResponse.<boolean>
# async deleteSmartSet(smartSetId) → {ApiResponse.<boolean>}
Delete a SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
Id of SmartSet. |
- Since:
- 10.2025
- Overrides:
True if deleted.
ApiResponse.<boolean>
# deleteStyles(styleIds) → {ApiResponse.<boolean>}
Delete styles / materials.
Parameters:
| Name | Type | Description |
|---|---|---|
styleIds |
Array.<string>
|
IDs of styles to delete. |
- Since:
- 10.2025
- Overrides:
True if styles deleted.
ApiResponse.<boolean>
# deleteViewpoint(objId) → {ApiResponse.<boolean>}
Delete a viewpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID |
True if viewpoint was deleted.
ApiResponse.<boolean>
# filterObjectsByProperties(objIds, filterExpression) → {ApiResponse.<Array.<string>>}
Filter objects by property values.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs of objects to filter. |
filterExpression |
Array.<any>
|
Filter criteria. |
Filtered object IDs.
ApiResponse.<Array.<string>>
Examples
[ "$ifcEntity##xs:string" , "==" , "IfcWall" ]
[ "$ifcEntity##xs:string" , "in" , ["IfcWall", "IfcWallStandardCase"]] , "and" , "$cnVolume##xs:double", ">=" , 2.5 ]]
[ "$ifcEntity##xs:string" , "match" , "/^IfcWall/g"]]
# filterObjectsByStatus(objIds, statusCode, statusFlag) → {ApiResponse.<Array.<string>>}
Filter objects by status.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs of objects to filter. |
statusCode |
string
|
one of [ 'selected', 'visible', 'wired', 'locked']. |
statusFlag |
boolean
|
true: status, false: inverted status. |
Filtered object IDs.
ApiResponse.<Array.<string>>
# async getChildIds(objIdList, depth)
Collect ids of contained objects in object list 'objIdList'
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
objIdList |
*
|
||
depth |
*
|
0 |
# async getConfig() → {Promise.<ApiResponse>}
Promise.<ApiResponse>
# getDrawEdges() → {ApiResponse.<boolean>}
DEPRECATED !
- Since:
- 28.11.2025, ar
- Overrides:
ApiResponse.<boolean>
# getInfo() → {object}
Get name and version of the current ModelViewer.
- Since:
- 10.2025
- Overrides:
JSON object containing name and version.
object
Example
{
"name" : "...",
"type" : "...",
"version" : ".."
}
# getInfohubSettings()
- Since:
- 2025-10-14, aab
- Overrides:
# getModelIds(domains) → {ApiResponse.<Array.<string>>}
Get model IDs for given domains.
Parameters:
| Name | Type | Description |
|---|---|---|
domains |
Array.<eDomain>
|
Domain (e.g. 'all') or combination as array, e.g. ['geo', 'act']. |
- Since:
- 10.2025
- Overrides:
Array of model IDs.
ApiResponse.<Array.<string>>
# getModelMetadata(modelId) → {ApiResponse.<object>}
Get metadata for given model.
Parameters:
| Name | Type | Description |
|---|---|---|
modelId |
string
|
Model ID. |
- Since:
- 10.2025
- Overrides:
ApiResponse.<object>
# getObject(objId) → {ApiResponse.<cnObject>}
Get object by ID. Synchronizes data with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
ID of object. |
returns object in GOM format
# getObjectIds(domain) → {ApiResponse.<Array.<string>>}
Get all object IDs for given domains as list.
Parameters:
| Name | Type | Description |
|---|---|---|
domain |
Array.<eDomain>
|
Domain (e.g. 'all') or combination as array, e.g. ['geo', 'act']. |
Array of object IDs.
ApiResponse.<Array.<string>>
# getObjects(objIdList, opt)
Get objects in GOM format
Parameters:
| Name | Type | Description |
|---|---|---|
objIdList |
Array.<string>
|
Object Ids |
opt |
*
|
|
Example
getObjects(
["obj1", "obj2"],
{
properties: {
"propertytypes": [ // whitelist by default
"cnName##xs:string",
"MyNumber##xs:double"
]
},
geometry: {},
relations: {},
nodes: {}
}
);
# getObjectsRootId(domain) → {ApiResponse.<string>}
Get root object ID for given domain.
Parameters:
| Name | Type | Description |
|---|---|---|
domain |
*
|
Domain (e.g. 'geo') |
Root object ID
ApiResponse.<string>
# getParentId(objId) → {ApiResponse.<string>}
Get parent ID of object.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
- Since:
- 10.2025
- Overrides:
- ID of closest parent
ApiResponse.<string>
# getPickedPoint()
return { 'intern' : [ ix , iy , iz ], 'global' : [ x , y , z ] }
# getProjectDirectory() → {ApiResponse.<string>}
Get project directory
file path
ApiResponse.<string>
# getProjectId()
- Since:
- 2025-12-02, SW
- Overrides:
# getProjectInfo() → {ApiResponse.<object>}
Get project metadata
- Since:
- 10.2025
- Overrides:
//RM
ApiResponse.<object>
# getProperties(objId, inclPropsFromTypes, filter) → {ApiResponse.<object>}
Get all properties of object.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
inclPropsFromTypes |
boolean
|
Include props from types. |
filter |
object
|
Filter criteria. |
ApiResponse.<object>
Examples
* // Example filter object:
const filter = {
name: "MyPset:MyNumber*",
datatype : ["xs:double", "xs:float"]
};
data: {
"MyPset:MyNumber##xs:double": "11",
"MyPset:MyNumberNew##xs:float": 42,
}
# getPropertyTypeInfo(ptKeyStr) → {ApiResponse.<(object|null)>}
Get property type metadata.
Parameters:
| Name | Type | Description |
|---|---|---|
ptKeyStr |
string
|
Access key of property type in the format name##datatype. |
ApiResponse.<(object|null)>
Example
data: {
name: "cnName",
displayName: "cn:Name",
datatype: "xs:string",
readonly: false,
...
}
# getPropertyTypeValues(ptKeyStr, options) → {ApiResponse.<Array.<string>>}
Get unique property values for type.
Parameters:
| Name | Type | Description |
|---|---|---|
ptKeyStr |
string
|
Access key of property type in the format name##datatype. |
options |
object
|
Options for filtering. |
- Since:
- 10.2025
- Overrides:
returns list of unique property values
ApiResponse.<Array.<string>>
Example
* // Example options object:
const options = {
objects: ['obj_1', 'obj_2'],
precision: 0.0001,
case_sensitive: true,
interval_size: 2.0,
interval_offset: 1.0,
date_grouping: 'week',
max_values: 0
};
# getPropertyTypes(filter) → {ApiResponse.<Array.<string>>}
Get a list of all available property types matching filter.
Parameters:
| Name | Type | Description |
|---|---|---|
filter |
object
|
Filter criteria. |
ApiResponse.<Array.<string>>
Example
* // Example filter object:
const filter = {
name: "MyPset:MyNumber*",
datatype : ["xs:double", "xs:float"]
readOnly: true
};
# getPropertyTypesByObject(objId, filter) → {ApiResponse.<Array.<object>>}
Get property types used by object.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
filter |
object
|
Filter criteria. |
ApiResponse.<Array.<object>>
Examples
* // Example filter object:
const filter = {
name: "MyPset:MyNumber*",
datatype : ["xs:double", "xs:float"]
readOnly: true
};
data: [
{
name: "MyPset:MyNumber",
displayName: "MyPset:MyNumber",
datatype: "xs:double",
readonly: true,
...
}
]
# getPropertyValue(objId, ptKeyStr) → {ApiResponse.<any>}
Get property value for object.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
ptKeyStr |
string
|
Access key of property type in the format name##datatype. |
-alue of property, depending on the datatype
ApiResponse.<any>
# getPropertyValues(objIds, ptKeyStr) → {ApiResponse.<Array.<object>>}
Get property values for multiple objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs. |
ptKeyStr |
string
|
Access key of property type in the format name##datatype. |
Map with object IDs as keys.
ApiResponse.<Array.<object>>
Example
data: {
"id1" : {
"value": 1.234,
"comment": ""
},
...
}
# getRootNodeId(domain) → {ApiResponse.<string>}
Get root node of object trees for a given domain.
Parameters:
| Name | Type | Description |
|---|---|---|
domain |
string
|
Domain (e.g. 'geo') |
- Since:
- 10.2025
- Overrides:
returns ID of root node of object trees for a given domain
ApiResponse.<string>
# getRootNodeIdOfSets(domain) → {ApiResponse.<string>}
Get root nodes of smartsets for given domain.
Parameters:
| Name | Type | Description |
|---|---|---|
domain |
string
|
Domain (e.g. 'geo') |
- Since:
- 10.2025
- Overrides:
ApiResponse.<string>
# getSelectedObjectIds(domains) → {ApiResponse.<Array.<string>>}
Get IDs of currently selected objects.
Parameters:
| Name | Type | Description |
|---|---|---|
domains |
Array.<eDomain>
|
Domain (e.g. 'all') or combination as array, e.g. ['geo', 'act']. |
- Since:
- 10.2025
- Overrides:
returns IDs of currently selected objects
ApiResponse.<Array.<string>>
# getStyleData(styleId, key) → {ApiResponse.<(object|string)>}
Get information about specific style / material attributes.
Parameters:
| Name | Type | Description |
|---|---|---|
styleId |
string
|
Style ID. |
key |
string
|
If specified, only the corresponding attribute is returned, otherwise the entire object. |
- Since:
- 10.2025
- Overrides:
Style attribute info.
ApiResponse.<(object|string)>
# getStyleIds() → {ApiResponse.<Array.<string>>}
Get list of Ids of all available styles.
- Since:
- 10.2025
- Overrides:
Array of style object Ids.
ApiResponse.<Array.<string>>
# getStyles(objIDs) → {ApiResponse.<Array.<object>>}
Get styles / materials / colors applied to given objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIDs |
Array.<string>
|
Object IDs. |
- Since:
- 10.2025
- Overrides:
Array of applied style / material objects.
ApiResponse.<Array.<object>>
# getViewpointData(objId) → {ApiResponse.<object>}
Get viewpoint data.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID |
JSON object with viewpoint data.
ApiResponse.<object>
# getViewpointIds() → {ApiResponse.<Array.<string>>}
Get list of all viewpoint ids.
- Since:
- 10.2025
- Overrides:
ApiResponse.<Array.<string>>
# getVisibleObjectIds(domains) → {ApiResponse.<Array.<string>>}
Get IDs of currently visible objects in given domain/domains.
Parameters:
| Name | Type | Description |
|---|---|---|
domains |
Array.<eDomain>
|
Domain (e.g. 'all') or combination as array, e.g. ['geo', 'act']. |
- Since:
- 10.2025
- Overrides:
returns IDs of currently visible objects in given domain/domains
ApiResponse.<Array.<string>>
# importModel(modelId) → {ApiResponse.<boolean>}
Add model to coordination model. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
modelId |
string
|
Model ID. |
True if successfully added
ApiResponse.<boolean>
# isSelected(objId) → {ApiResponse.<boolean>}
Check if object is selected.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
True if object is selected.
ApiResponse.<boolean>
# isVisible(objId) → {ApiResponse.<boolean>}
Check if object is visible.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
True if object is visible.
ApiResponse.<boolean>
# async loginUser(cb, user)
Get user,token Uses 'old' IAM login for now.
returns { 'status' : 'data' : { 'user' : " ... " 'token' : " ... " } }
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
cb |
*
|
||
user |
*
|
null |
# loginUser__idp(cb, user)
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
cb |
*
|
Call Back returns : { } |
|
user |
*
|
null |
# logoutUser(cb) → {ApiResponse.<Object>}
Logout user. Clear user and token.
Parameters:
| Name | Type | Description |
|---|---|---|
cb |
function
|
Callback function |
response
ApiResponse.<Object>
# onSelectionChanged()
# onVisibilityChanged()
# openUrl(url, target)
Open URL/Link in external browser or in webform module
Parameters:
| Name | Type | Description |
|---|---|---|
url |
*
|
|
target |
*
|
# removeModel(modelId) → {ApiResponse.<boolean>}
remove model from project. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
modelId |
string
|
Model ID. |
True if model was successfully removed.
ApiResponse.<boolean>
# async removeObjectsFromSmartSet(smartSetId, objIds) → {ApiResponse.<boolean>}
Remove objects from SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
SmartSet ID. |
objIds |
Array.<string>
|
Object IDs to remove. |
- Since:
- 10.2025
- Overrides:
True if objects effectivily removed
ApiResponse.<boolean>
# removeSelectionEventListener(listener) → {Promise.<null>}
remove selection listener, no extra call back function
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
*
|
- Since:
- 08.12.2025, ar
- Overrides:
Promise.<null>
# removeStyleSchemaFromSmartSet(smartSetId) → {ApiResponse.<boolean>}
Remove style from SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
ID the SmartSet. |
- Since:
- 10.2025
- Overrides:
True if successfully removed.
ApiResponse.<boolean>
# removeViewpointFromSmartSet(smartSetId) → {ApiResponse.<boolean>}
remove viewpoint to SmartSet.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
ID the SmartSet. |
- Since:
- 10.2025
- Overrides:
True if successfully removed.
ApiResponse.<boolean>
# removeVisibilityEventListener(listener) → {Promise.<null>}
remove visibility listener, no extra call back function
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
*
|
- Since:
- 08.12.2025, ar
- Overrides:
Promise.<null>
# async resetStyles() → {ApiResponse.<void>}
Reset styles (materials,colors) of all objects
ApiResponse.<void>
Example
Infohub.ModelViewer.resetStyles( [ Infohub.ModelViewer.eDomain.GEO ] )
# resetStylesOfObjects(objIds) → {ApiResponse.<boolean>}
Reset styles to default.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs. |
- Since:
- 10.2025
- Overrides:
True if reset succeeded. styles reset to default
ApiResponse.<boolean>
# saveProject() → {ApiResponse.<boolean>}
Save current project, show SaveFileDialog if project was newly created and no file path is available.
True if project was saved successfully.
ApiResponse.<boolean>
# setAllSelected(flagOnOff, domains) → {ApiResponse.<void>}
Set all objects of specified domains as selected or deselected.
Example:
// assume a COLNEO pro adapter is instantiated (e.g. in index.js) ...
const { COLNEOproAdapterServices } = await import("./node_modules/@colneo/infohub-js-api/dist/adapter/AdapterColneoPro.js");
Infohub.ModelViewer = await COLNEOproAdapterServices.createAdapter()
// clear selection of objects in domain 'geometry'
Infohub.ModelViewer.setAllSelected( [ Infohub.ModelViewer.eDomain.GEO ], false )
Parameters:
| Name | Type | Description |
|---|---|---|
flagOnOff |
boolean
|
|
domains |
Array.<string>
|
ApiResponse.<void>
# setAllVisible(domains, flagOnOff) → {ApiResponse.<void>}
Set visibility of all objects of given domains.
Parameters:
| Name | Type | Description |
|---|---|---|
domains |
Array.<eDomain>
|
Array of domains to be taken into account |
flagOnOff |
boolean
|
true = show, false = hide |
- Since:
- 01.12.2025, ar
- Overrides:
ApiResponse.<void>
Example
// assume a COLNEO pro adapter is instantiated (e.g. in index.js) ...
const { COLNEOproAdapterServices } = await import("./node_modules/@colneo/infohub-js-api/dist/adapter/AdapterColneoPro.js");
Infohub.ModelViewer = await COLNEOproAdapterServices.createAdapter( Infohub.Context )
// set visibility for objects in domain 'geometry'
Infohub.ModelViewer.setAllVisible( [ Infohub.ModelViewer.eDomain.GEO ], true )
# async setConfig(cfg) → {Promise.<ApiResponse>}
Set viewer configuration.
Changes configuration partially!
Parameters:
| Name | Type | Description |
|---|---|---|
cfg |
*
|
= { "edges" : bool, "grid" : { "show" : bool, "color" : #hex }, "background" : { "color" : #hex } } |
Promise.<ApiResponse>
# setDrawEdges(onOff) → {ApiResponse}
DEPRECATED !
Parameters:
| Name | Type | Description |
|---|---|---|
onOff |
boolean
|
- Since:
- 28.11.2025, ar
- Overrides:
# setInfohubSettings()
- Since:
- 2025-10-14, aab
- Overrides:
# setProperties(objIds, properties) → {ApiResponse.<boolean>}
Set multiple property values for each object in object list.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Array of Object IDs. |
properties |
object
|
Key/value pairs, key format name##datatype |
ApiResponse.<boolean>
Example
// Example properties object:
const properties = {
"myType##xs:string" : "ABC",
"myNumber##xs:double" : 1.234,
"myBoolean##xs:boolean" : true
};
# setPropertiesByMap(propertyMap) → {ApiResponse.<boolean>}
Set properties in a batch by a property map object -> properties
Parameters:
| Name | Type | Description |
|---|---|---|
propertyMap |
*
|
{
} |
ApiResponse.<boolean>
# setPropertyValue(objId, ptKeyStr, value) → {ApiResponse.<boolean>}
Set single property value. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID. |
ptKeyStr |
string
|
property typeidö in the format name##datatype. |
value |
string
|
New value. |
ApiResponse.<boolean>
# setSelected(objIds, flagOnOff, exclusively) → {ApiResponse.<number>}
Set selection of objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs. |
flagOnOff |
boolean
|
Selection flag. |
exclusively |
boolean
|
If true, clear all other selections. |
- Since:
- 10.2025
- Overrides:
Number of objects whose selection changed.
ApiResponse.<number>
# setViewpointData(objId, viewpointData) → {ApiResponse.<boolean>}
Set viewpoint data.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID |
viewpointData |
object
|
Viewpoint data to set. |
True if viewpoint data was set.
ApiResponse.<boolean>
# setVisible(objIds, flagOnOff, exclusively) → {ApiResponse.<number>}
Set visibility of objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs. |
flagOnOff |
boolean
|
true: visible, false: hidden |
exclusively |
boolean
|
If the 'exclusivly' flag is set to true, the domains affected are determined by the specified objects. The remaining objects in these domains are set to the inverse status. |
- Since:
- 10.2025
- Overrides:
Number of objects whose status changed.
ApiResponse.<number>
# async showHomeViewpoint() → {ApiResponse.<void>}
Reset camera to home viewpoint.
If a home viewpoint does not exist, the camera and clipping planes are reset
- Since:
- 01.2026
- Overrides:
ApiResponse.<void>
Example
Infohub.ModelViewer.showHomeViewpoint()
# toggleSelection(objIds) → {ApiResponse.<void>}
Toggle selection status of given objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs to toggle. |
ApiResponse.<void>
# toggleVisibility(objIds) → {ApiResponse.<void>}
Toggle visibility of given objects.
Parameters:
| Name | Type | Description |
|---|---|---|
objIds |
Array.<string>
|
Object IDs to toggle. |
ApiResponse.<void>
# async transformObject(id, T) → {ApiResponse}
Rotate and Translate object.
Rotation is executed first around point 'rotatePoint' with rotation matrix 'rotateMat6rix', then object is translated.
if includeContained is true ont only the geometry of the object itself is transformed but also the included objects ('id' could be a model, a container or an assembly)
Parameters:
| Name | Type | Description |
|---|---|---|
id |
*
|
|
T |
*
|
= {
'move' : [],
'rotate' : {
'pivot' : [ x , y , z ],
'alpha' : val_deg
} |
# updateSmartSet(smartSetId) → {ApiResponse.<boolean>}
Update SmartSet. Synchronizes with Infohub.
Parameters:
| Name | Type | Description |
|---|---|---|
smartSetId |
string
|
SmartSet ID. |
True if SmartSet was updated.
ApiResponse.<boolean>
# updateStyle(styleId, styleData) → {ApiResponse.<boolean>}
Update style / material.
Parameters:
| Name | Type | Description |
|---|---|---|
styleId |
string
|
Style ID. |
styleData |
object
|
Updated style data. |
True if style was updated.
ApiResponse.<boolean>
# updateViewpoint(objId, data) → {ApiResponse.<boolean>}
Update existing viewpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
objId |
string
|
Object ID |
data |
object
|
Data for the viewpoint in JSON notation |
- Since:
- 10.2025
- Overrides:
True if update was successful.
ApiResponse.<boolean>