Activates the tool in the viewer.
The name of the tool. "reset" value resets the tool to the default tool
The options to be set for the tool
The awaitable task
Adds the panorama tiles in the viewer space.
PanoramaMetadata - Panorama tile configuration
The awaitable task that will resolve into boolean.
Adds the point clouds into the viewer space.
PointCloud - point cloud source data.
The awaitable task that will resolve into boolean.
Adds the section plane to the viewer.
The section
The added section plane(s)
Adds a trimbim model to the viewer. If only visibility and placement needs to be changed, then it is suggested not to pass blob which will result in serialization penalty and reloading of the trimbim. The limit for trimbim size is 10MB.
The trb model
The added TrimBimModel(s)
Gets the external IDs for the loaded objects in the viewer with the given runtime entity IDs.
The function throws an exception if no matching external ID is found for every runtime ID in the runtimeIds
argument.
The model identifier
The runtime identifiers of the objects
The awaitable task that returns the external IDs for the loaded objects in the viewer with the given runtime IDs
Gets the runtime entity IDs of the objects identified by external unique IDs. E.g. For the IFC format, and external id is the uncompressed guid associated with the object.
The model identifier
The external object identifiers
A Promise which resolves to an array of runtime IDs. The return value array is always of same length as the objectIds
argument array. For any index where no runtime ID was found for the given objectId
, the value of the said index will be undefined
or null
.
Gets the current camera data asynchronously.
The awaitable task that returns the current camera data
Gets the current camera navigation mode in the viewer
The awaitable task that will resolve into CameraMode.
Gets all the colored objects in the current Trimble Connect project asynchronously.
The awaitable task that returns the colored object entities in the current Trimble Connect project.
Retreives hierarchy children of given parent
The model identifier
The parent entity ids
The hierarchy type
(default false) if false only direct children are returned, otherwise returns tho whole tree or children.
Retreives hierarchy parents of given children
The model identifier
The children entity ids
The hierarchy type
(default false) if false only direct parents are returned, otherwise returns all parents up to hierarchy roots.
(default false) if false the parent will be returned when atleast one child is given in entityIds, otherwise parent is returned only when all its children are.
Gets the list of icons that where added through the API.
The awaitable task that returns the list of icons.
Gets the list of layers asynchronously.
The identifier of the model to which the layers belong
The awaitable task that returns the model object entities in the current Trimble Connect 3D Viewer
Get the loaded model file
The identifier of the model
The awaitable task that returns the model file
Gets the list of all models that are available from the file tree asynchronously.
The awaitable task that returns the model files
Gets the bounding box of the objects based on the ObjectRuntimeId.
The identifier of the model to which the object belongs
Array of objectRuntimeId.
The awaitable task that returns the ObjectBoundingBox.
Gets the positions of the objects based on the ObjectRuntimeId.
The identifier of the model to which the object belongs
Array of objectRuntimeId.
The awaitable task that returns the ObjectPosition.
Gets the object properties asynchronously.
The identifier of the model to which the object belongs
The object runtime identifiers
The awaitable task that returns the model object entities in the current Trimble Connect 3D Viewer
Gets the objects satisfying the selector and object state criteria.
The selector defining the selection criteria to retrieve the objects.
The objectState defining the visibility criteria to retrieve the objects.
The awaitable task that returns the model object entities in the current Trimble Connect 3D Viewer.
Gets the point cloud and panorama tiles added to the viewer using addPointCloud and addPanorama
The awaitable task that will resolve into PointCloud
Gets the presentation of the current view.
The awaitable task that returns the current view's presentation data.
Gets the list of section planes that are in 3D.
The awaitable task that returns the current objects selection data
Gets the current objects selection data asynchronously.
The awaitable task that returns the current objects selection data
Gets the current viewer settings asynchronously.
The awaitable task that returns the current viewer settings.
Gets the snapshot of the current view.
A Promise which resolves to a Data URL string containing a base64 encoded image. E.g. data:image/png;base64,SGVsbG8sIFdvcmxkIQ...
Gets the loaded trimbim models.
The awaitable task that returns the loaded trimbims.
Equivalent to the "Show only selected objects" feature in the viewer. It will simply hide all objects except the ones provided in the input.
The awaitable task that will resolve into boolean.
Sets the model placement asynchronously.
The ID of the model whose placement will be changed
The model placement data to be applied
The awaitable task
Removes any model file from the viewer
unique identifier of the model file
allows to reset the viewer camera position
The awaitable task that will resolve into boolean.
Removes section planes in viewer.
The identifiers of the sectionPlanes that needs to be removed(optional). If this value is not provided or empty array is given then all sectionPlanes will be removed.
Removes the trimbim model from the viewer.
The awaitable task
Resets model, camera and tools to their default states asynchronously
The awaitable task
Sets the access token of the 3D viewer asynchronously.
The Trimble Connect access token
The Trimble Connect refresh token
The awaitable task
Sets the camera data asynchronously.
The camera data to be applied; or sets the camera to fit according to the object selector; or "reset" string to reset the camera to default; or the camera preset to be applied
The camera options to be applied, like animationTime;
The awaitable task
Sets the current camera navigation mode in the viewer
allowed camera navigation modes by the viewer
The spawn point for the camera mode - walk
The awaitable task that will resolve into boolean.
Sets the layers visibility of the model asynchronously.
The ID of the model whose layers visibility will be changed
A value containing the layers whom visibility will be changed
The awaitable task
Sets the object state asynchronously.
The selector which defines the affected objects. If the argument is undefined
, the objectState
is applied to all objects in the loaded models
The object state to be applied
The awaitable task
Sets the opacity of the 3D viewer asynchronously.
The opacity level, which ranges from 0 to 100
The awaitable task
Sets the configuration of point clouds based on the modeId
IPointCloudSettings - allowed point cloud configuration settings.
The awaitable task that will resolve into boolean.
Define object selection in loaded 3d models.
A selector which defines to which objects to apply the mode
argument to.
The mode is applied to all objects matching the criteria defined by the selector
argument
add
= Add objects to the currently selected objectsremove
= Remove objects from the currently selected objectsset
= Set objects as selected. Any other objects are deselected.The awaitable task
Sets the viewer settings asynchronously.
ViewerSettings - configure the assemblySelection mode and fitToZoomRatio.
The awaitable task.
Toggles the model state asynchronously.
The model identifier or array of model identifiers
A value indicating whether the model should be loaded or unloaded. If this parameter is not defined, the model state will be toggled
Value indicating if model(s) should be fitted to view after loading.
The awaitable task
Toggles the model version state asynchronously.
The model identifier or array of model identifiers. The model identifier includes model id and version id.
A value indicating whether the model should be loaded or unloaded. If this parameter is not defined, the model state will be toggled
Value indicating if model(s) should be fitted to view after loading.
The awaitable task
The API for communicating with Trimble Connect 3D Viewer viewer.