ContextAPI#
Interface ContextAPI
Hierarchy
- AnnotationAPI
- ClipPlaneAPI
- CollectionAPI
- ContextStateAPI
- ExplosionAPI
- FrameAPI
- HubAPI
- InstanceGraphAPI
- InteractionAPI
- LayerFilterAPI
- EventAPI
- MeasurementAPI
- DrawingAPI
- DrawingPlaneAPI
- QueryAPI
- SelectionAPI
- SessionAPI
- SettingsAPI
- SessionStorageAPI
- UtilityAPI
- AttachmentAPI
- AnimationAPI
- NodePathAPI
- RealityAPI
- TopologyAPI
- VariantsAPI
- ContextAPI
Index
Methods
Methods
add
- add(dataURI: string, parentID?: number, usage?: UsageString, label?: string, contentType?: string, initialProperties?: { [key: string]: any }, cacheStrategy?: CacheStrategy): number
-
Loads the resource behind the given dataURI and returns the id of the new contents root Node.
Parameters
-
dataURI: string
Specifies the URI of the data resource.
-
Optional
parentID: numberBy specifying a parentID the resource can be added to an arbitrary Node instead of the tree root.
-
Optional
usage: UsageStringThe usage parameter allows to define how the resource should be inserted in the InstanceGraph.
-
Optional
label: stringThe label can be used to set a string that is shown in the UI as a name of the Node.
-
Optional
contentType: stringWith contentType the type of the input data can be specified with a MimeType or any other descriptor.
-
Optional
initialProperties: { [key: string]: any }A map of properties to initialize the new Node.
-
[key: string]: any
-
-
Optional
cacheStrategy: CacheStrategyDefines the strategy which is used when a data cache is requested from the Hub.
Returns number
The id of the new contents root Node
-
- add(params: { [key: string]: any }): number
-
Variant of the add function, accepting a params object instead of explicit parameters. The params object is a map from parameter names to parameter values.
Parameters
-
params: { [key: string]: any }
The params object.
-
[key: string]: any
-
Returns number
-
add Custom Node
- add
Custom Node(customNodeType: string, data: any, dataType?: AttachmentType): number -
Creates a custom Node with custom data which is stored in an Attachment.
Parameters
-
customNodeType: string
{string} Specifies the custom Node type.
-
data: any
{any} Specifies the data of the custom Node.
-
Optional
dataType: AttachmentType{AttachmentType="json"} Specifies the type of the data.
Returns number
-
add To Collection
- add
To Collection(collectionID: number, nodeID: number, recursive?: boolean): void -
Adds the node given by nodeID to the collection with id collectionID. If recursive is true, the descendants of the node are also added. Returns the number of nodes in the collection.
Parameters
-
collectionID: number
Specifies to which collection the node should be added
-
nodeID: number
Specifies which node should be added to the collection
-
Optional
recursive: booleanSpecifies if the children of the node should also be added to the collection
Returns void
-
add To Selection
- add
To Selection(nodeID: number | number[], silent?: boolean): Promise<ChangeSelectionResult> -
Adds the given Nodes to the Selection.
Parameters
-
nodeID: number | number[]
The ID of the Node that should be added to the current Selection
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
add Topology To Selection
- add
Topology To Selection(handle: TopologyHandle | TopologyHandle[]): Promise<void> -
Adds one or multiple Topology elements to the current selection.
Parameters
-
handle: TopologyHandle | TopologyHandle[]
A Topology Element or the list of Topology Elements which should be added to the current selection.
Returns Promise<void>
-
change Annotation
- change
Annotation(annotationID: number, label?: string, visible?: boolean, anchorPosition?: Float32Array | number[], labelPosition?: Float32Array | number[], active?: boolean, transform?: Float32Array | number[]): void -
Changes an annotation.
Parameters
-
annotationID: number
The ID of the annotation.
-
Optional
label: stringThe text of the annotation.
-
Optional
visible: booleanIndicates if the annotation should be visible or hidden.
-
Optional
anchorPosition: Float32Array | number[]Anchor position in world space coordinates.
-
Optional
labelPosition: Float32Array | number[]The position of the label.
-
Optional
active: booleanDEPRECATED
-
Optional
transform: Float32Array | number[]The transformation of the annotation.
Returns void
-
change Clip Plane
- change
Clip Plane(clipPlaneId: number, properties: ClipPlaneProperties): ClipPlaneProperties -
Changes one or more properties of a clip plane with the specified id.
Parameters
-
clipPlaneId: number
The id of the clip plane you want to change.
-
properties: ClipPlaneProperties
The properties of the clip plane you want change.
Returns ClipPlaneProperties
An Object with the changed Properties.
-
- change
Clip Plane(clipPlaneID: number, normal?: Float32Array | number[], point?: Float32Array | number[], name?: string, thickness?: number, tangent?: Float32Array | number[], disabled?: boolean, invisible?: boolean, exclusive?: boolean): void -
Changes the properties of the clip plane defined by the clipPlaneID with the optional parameters normal, points and name.
Deprecated
Calling changeClipPlane with single parameters is deprecated, please use ClipPlaneProperties instead.
Parameters
-
clipPlaneID: number
The ID of an existing clip plane which should be changed
-
Optional
normal: Float32Array | number[]The new normal of the clip plane
-
Optional
point: Float32Array | number[]An arbitrary new point in space which lies on the clip plane
-
Optional
name: stringThe new name for the clip plane
-
Optional
thickness: numberThe thickness for the clip plane
-
Optional
tangent: Float32Array | number[]The tangent of the clip plane
-
Optional
disabled: booleanThe enabled state of the clip plane
-
Optional
invisible: booleanInvisible on the UI
-
Optional
exclusive: booleanset the exclusive flag to clip geometry when using exclusiveClipplanes property
Returns void
-
change Clipping Room
- change
Clipping Room(properties?: ClipRoomProperties): ClipRoomProperties -
Changes one or more properties of the clip room.
Parameters
-
Optional
properties: ClipRoomPropertiesThe properties of the clip room you want change.
Returns ClipRoomProperties
An object with the changed properties.
-
- change
Clipping Room(name?: string, size?: Float32Array | number[], transformation?: Float32Array | number[], disabled?: boolean, invisible?: boolean): ClipRoomProperties -
Deprecated
Calling changeClippingRoom with single parameters is deprecated, please use ClipRoomProperties instead.
Changes one or more properties of the clip room.
Parameters
-
Optional
name: stringThe name of the clip room.
-
Optional
size: Float32Array | number[]The size of the clip room.
-
Optional
transformation: Float32Array | number[]The transformation of the clip room.
-
Optional
disabled: booleanThe disabled state of the clip room.
-
Optional
invisible: booleanThe invisible state of the clip room.
Returns ClipRoomProperties
An object with the changed properties.
-
change Drawing
- change
Drawing(drawingId: number, properties: DrawingProperties): DrawingProperties -
Changes one or more properties of a Drawing with the specified id.
Parameters
-
drawingId: number
The id of the Drawing.
-
properties: DrawingProperties
The properties of the Drawing.
Returns DrawingProperties
An object with the changed properties.
-
change Drawing Plane
- change
Drawing Plane(drawingPlaneId: number, properties: DrawingPlaneProperties): DrawingPlaneProperties Experimental
Changes one or more properties of a DrawingPlane with the specified ID.
Parameters
-
drawingPlaneId: number
The ID of the DrawingPlane you want to change.
-
properties: DrawingPlaneProperties
The properties of the DrawingPlane you want change.
Returns DrawingPlaneProperties
An Object with the changed Properties.
-
change Measurement
- change
Measurement(measurementID: number, progress: MeasurementProgress, visible?: boolean, name?: string): void -
Parameters
-
measurementID: number
-
progress: MeasurementProgress
-
Optional
visible: boolean -
Optional
name: string
Returns void
-
change Setting
- change
Setting<T>(setting: T, value: ContextSettingType<T>): boolean -
Changes the setting to the given value.
Type Parameters
-
T extends string
Parameters
-
setting: T
A name that specifies a particular setting
-
value: ContextSettingType<T>
The new value for the setting
Returns boolean
A boolean which indicates if the setting has changed
-
change Snapshot
- change
Snapshot(snapshotID: number, properties: SnapshotProperties): SnapshotProperties -
Changes one or more properties of a Snapshot with the specified ID.
Parameters
-
snapshotID: number
The ID of the Snapshot you want to change.
-
properties: SnapshotProperties
The properties of the Snapshot you want to change.
Returns SnapshotProperties
An object with the changed Properties.
-
- change
Snapshot(snapshotID: number, name?: string, screenshotURL?: string, order?: number): SnapshotProperties -
This changes the textual description of the Snapshot for given snapshotID to the value of text.
Deprecated
Calling changeSnapshot with single parameters is deprecated, please use SnapshotProperties instead.
Parameters
-
snapshotID: number
The ID of the Snapshot.
-
Optional
name: stringThe new name of the Snapshot.
-
Optional
screenshotURL: stringThe new screenshot URL of the Snapshot.
-
Optional
order: number
Returns SnapshotProperties
-
clear Selection
- clear
Selection(silent?: boolean): Promise<ChangeSelectionResult> -
Clears the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
clear Topology Selection
clip Other Parts
collect Runtime Nodes Of Type
- collect
Runtime Nodes Of Type(nodeType: NodeType, subType?: string): number[] -
Returns a list of all existing runtime Node ids of a specified type.
Parameters
-
nodeType: NodeType
The Node type to collect.
-
Optional
subType: stringThe sub type to collect. Only used for Custom-Nodes.
Returns number[]
A list of runtime Node ids of the specified type.
-
connect To Session
- connect
To Session(sessionID?: string, name?: string): Promise<SessionStateData> -
Deprecated
The whole SessionAPI is under consolidation and will be replaced in a future release.
Connects to a Session. If the ID does not exist, a new Session will be created.
Parameters
-
Optional
sessionID: stringThe ID of the Session.
-
Optional
name: stringThe ID of the Session.
Returns Promise<SessionStateData>
-
connectXRSession
- connectXRSession(): Promise<XRSessionState>
Experimental
Connects to the XR Session.
Returns Promise<XRSessionState>
Returns a Promise with the current XRSessionState.
create Animation Frames
- create
Animation Frames(name: string, frames: AnimationFrame[]): void -
Creates a new keyframe-based animation sequence.
Parameters
-
name: string
The name of the animation sequence.
-
frames: AnimationFrame[]
The keyframes of the animation sequence.
Returns void
-
create Annotation
- create
Annotation(nodeID: number, label: string, visible?: boolean, anchorPosition?: Float32Array | number[], labelOffset?: Float32Array | number[]): number -
Creates a new annotation.
Parameters
-
nodeID: number
The ID of the node that the annotation belongs to.
-
label: string
The text of the annotation.
-
Optional
visible: booleanIndicates if the annotation should be visible or hidden.
-
Optional
anchorPosition: Float32Array | number[]Anchor position in world space coordinates.
-
Optional
labelOffset: Float32Array | number[]The offset between anchorPosition and where the label should be displayed.
Returns number
The ID of the new annotation.
-
create Attachment
- create
Attachment(dataType?: AttachmentType): number -
Creates a new attachment.
Parameters
-
Optional
dataType: AttachmentTypeSpecifies the attachment data type.
Returns number
The attachment id.
-
create Box Volume
create Capping
- create
Capping(clipPlaneId: number): Promise<void> Experimental
Generates capping geometry for the surface that is cut by the clip plane. The generated surfaces allow measurements and all other operations which can be performed on usual geometry.
Parameters
-
clipPlaneId: number
the id of the clip plane
Returns Promise<void>
-
create Clip Plane
- create
Clip Plane(properties?: ClipPlaneProperties): number -
Creates a new clip plane.
Parameters
-
Optional
properties: ClipPlanePropertiesInitial properties of the created clip plane.
Returns number
The id of the newly created clip plane.
-
- create
Clip Plane(normal?: Float32Array | number[], point?: Float32Array | number[], name?: string, thickness?: number, tangent?: Float32Array | number[], disabled?: boolean, invisible?: boolean, exclusive?: boolean): number -
Creates a clip plane defined by the plane’s normal, positioned at an optional point (otherwise at the world space origin) and an optional name. Returns the ID of the clip plane.
Deprecated
Calling createClipPlane with single parameters is deprecated, please use ClipPlaneProperties instead.
Parameters
-
Optional
normal: Float32Array | number[]The normal of the clip plane
-
Optional
point: Float32Array | number[]An arbitrary point in space which lies on the clip plane
-
Optional
name: stringThe name of the clip plane
-
Optional
thickness: numberThe thickness of the clip plane
-
Optional
tangent: Float32Array | number[]The tangent of the clip plane
-
Optional
disabled: booleanThe state of the clip plane
-
Optional
invisible: booleanInvisible on the UI
-
Optional
exclusive: booleanset the exclusive flag to clip geometry when using exclusiveClipplanes property
Returns number
The ID of the newly created clip plane
-
create Clipping Room
- create
Clipping Room(properties?: ClipRoomProperties): void -
Creates a new clip room.
Parameters
-
Optional
properties: ClipRoomPropertiesInitial properties of the created clip room.
Returns void
-
- create
Clipping Room(name?: string, size?: Float32Array | number[], transformation?: Float32Array | number[], disabled?: boolean, invisible?: boolean): void -
Deprecated
Calling createClippingRoom with single parameters is deprecated, please use ClipRoomProperties instead.
Creates a new clip room.
Parameters
-
Optional
name: stringThe name of the clip room.
-
Optional
size: Float32Array | number[]The size of the clip room.
-
Optional
transformation: Float32Array | number[]The transformation of the clip room.
-
Optional
disabled: booleanThe disabled state of the clip room.
-
Optional
invisible: booleanThe invisible state of the clip room.
Returns void
-
create Collection
- create
Collection(nodeIDlist?: number[]): number -
Returns the id of a new collection containing the nodes from the given list.
Parameters
-
Optional
nodeIDlist: number[]An array of node id's from which a new node collection should be created.
Returns number
The id of the newly created node collection.
-
- create
Collection(): number -
Creates a new, empty collection and returns its id.
Returns number
The id of the newly created collection.
create Drawing
- create
Drawing(data: ViewerDrawingResult, properties?: DrawingProperties): number -
Creates a new Drawing from the Output of the ViewerDrawingAPI.
Parameters
-
data: ViewerDrawingResult
The data generated with the help of the ViewerDrawingAPI.
-
Optional
properties: DrawingPropertiesInitial properties of the created Drawing.
Returns number
The id of the newly created Drawing.
-
create Drawing Plane
- create
Drawing Plane(properties?: DrawingPlaneProperties): number Experimental
Creates a new DrawingPlane with the specified properties.
Parameters
-
Optional
properties: DrawingPlanePropertiesInitial properties of the created Drawing.
Returns number
The ID of the newly created Drawing.
-
create Explosion
create Measurement
- create
Measurement(type: MeasurementType, clickResult1: IClickResult, clickResult2?: IClickResult, name?: string): number -
Creates a new measurement and returns the ID. If no name is given, the measurement will be automatically named (e.g., “Measurement 23”).
Parameters
-
type: MeasurementType
-
clickResult1: IClickResult
-
Optional
clickResult2: IClickResult -
Optional
name: string
Returns number
-
create Node Path Handles
- create
Node Path Handles(targets: number[]): Promise<NodePathHandle[]> -
createNodePathHandles Creates and returns handles for the target node ids or topology selectors.
Parameters
-
targets: number[]
{Array
} Array of target node ids to create the handles for
Returns Promise<NodePathHandle[]>
The array of handles
-
create Snapshot
- create
Snapshot(name?: string, options?: SnapshotCreationOptions): Promise<number> -
Creates a Snapshot of the current.
Parameters
-
Optional
name: stringThe Name of the Snapshot.
-
Optional
options: SnapshotCreationOptionsOptions used for the Snapshot creation.
Returns Promise<number>
The Snapshot ID.
-
create Viewer
- create
Viewer(viewerID?: string, canvas?: HTMLCanvasElement, settings?: { aaSetting: any; backgroundColor: any; cappingEffectEdgeColor: any; cappingEffectEnabled: any; cappingEffectInnerColor: any; colorComparisonFirstColor: any; colorComparisonMatchingColor: any; colorComparisonSecondColor: any; colorizeEffect: any; coordSys: any; defaultFieldOfView: any; disableSpecularHighlights: any; doubleClickAnimationVolumeScale: any; doubleClickTimeWindow: any; drawingColor: any; drawingMode: any; drawingSize: any; dynamicAuxContrastEnabled: any; dynamicCOREnabled: any; dynamicClippingDistance: any; dynamicClippingEnabled: any; expandOnViewerSelection: any; faceHighlightColor: any; faceSelectionColor: any; fitViewFactor: any; flyNavigationSpeed: any; flyToOnDoubleClick: any; focusOnDoubleClick: any; frustumCulling: any; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: any; hoverColor: any; initView: any; initialFit: any; lightingEnvironment: any; lineHighlightColor: any; lineSelectionColor: any; maxDynamicClipDistance: any; maxGPUMemory: any; maxSRCCPUMemory: any; mouseInvertZoomingDirection: any; navigationMode: any; navigationSampling: any; navigationSpeedFactor: any; navigationSpeedThrottleFactor: any; preSelectionColor: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: any; renderSetup: any; screenSpaceCoverageCalculationMethod: any; selectionColor: any; showAuxOnNavigation: any; silhouetteEffect: any; silhouetteEffectColor: any; silhouetteEffectExclusiveEnabled: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; soc: any; spacemouseMultiplier: any; topoGeometryColor: any; topoGeometrySecondaryColor: any; topoPointsEnabled: any; turntableLowerVerticalLimit: any; turntableUpperVerticalLimit: any; turntableVerticalLimitsEnabled: any; useDevicePixelRatio: any; vertexColorsEnabled: any; viewPerspective: any; webglPreserveDrawingbuffer: any }): ViewerAPI -
Creates a viewer element.
Parameters
-
Optional
viewerID: stringThe id of the viewer.
-
Optional
canvas: HTMLCanvasElementThe canvas which is attached to the viewer.
-
Optional
settings: { aaSetting: any; backgroundColor: any; cappingEffectEdgeColor: any; cappingEffectEnabled: any; cappingEffectInnerColor: any; colorComparisonFirstColor: any; colorComparisonMatchingColor: any; colorComparisonSecondColor: any; colorizeEffect: any; coordSys: any; defaultFieldOfView: any; disableSpecularHighlights: any; doubleClickAnimationVolumeScale: any; doubleClickTimeWindow: any; drawingColor: any; drawingMode: any; drawingSize: any; dynamicAuxContrastEnabled: any; dynamicCOREnabled: any; dynamicClippingDistance: any; dynamicClippingEnabled: any; expandOnViewerSelection: any; faceHighlightColor: any; faceSelectionColor: any; fitViewFactor: any; flyNavigationSpeed: any; flyToOnDoubleClick: any; focusOnDoubleClick: any; frustumCulling: any; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: any; hoverColor: any; initView: any; initialFit: any; lightingEnvironment: any; lineHighlightColor: any; lineSelectionColor: any; maxDynamicClipDistance: any; maxGPUMemory: any; maxSRCCPUMemory: any; mouseInvertZoomingDirection: any; navigationMode: any; navigationSampling: any; navigationSpeedFactor: any; navigationSpeedThrottleFactor: any; preSelectionColor: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: any; renderSetup: any; screenSpaceCoverageCalculationMethod: any; selectionColor: any; showAuxOnNavigation: any; silhouetteEffect: any; silhouetteEffectColor: any; silhouetteEffectExclusiveEnabled: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; soc: any; spacemouseMultiplier: any; topoGeometryColor: any; topoGeometrySecondaryColor: any; topoPointsEnabled: any; turntableLowerVerticalLimit: any; turntableUpperVerticalLimit: any; turntableVerticalLimitsEnabled: any; useDevicePixelRatio: any; vertexColorsEnabled: any; viewPerspective: any; webglPreserveDrawingbuffer: any }ViewerSettings
-
aa
Setting: any -
background
Color: any -
capping
Effect Edge Color: any -
capping
Effect Enabled: any -
capping
Effect Inner Color: any -
color
Comparison First Color: any -
color
Comparison Matching Color: any -
color
Comparison Second Color: any -
colorize
Effect: any -
coord
Sys: any -
default
Field Of View: any -
disable
Specular Highlights: any -
double
Click Animation Volume Scale: any -
double
Click Time Window: any -
drawing
Color: any -
drawing
Mode: any -
drawing
Size: any -
dynamic
Aux Contrast Enabled: any -
dynamicCOREnabled: any
-
dynamic
Clipping Distance: any -
dynamic
Clipping Enabled: any -
expand
On Viewer Selection: any -
face
Highlight Color: any -
face
Selection Color: any -
fit
View Factor: any -
fly
Navigation Speed: any -
fly
To On Double Click: any -
focus
On Double Click: any -
frustum
Culling: any -
gizmo
Scaling Factor: any -
gizmos
Enabled: any -
gpu
Memory Release Factor: any -
hover
Color: any -
init
View: any -
initial
Fit: any -
lighting
Environment: any -
line
Highlight Color: any -
line
Selection Color: any -
max
Dynamic Clip Distance: any -
maxGPUMemory: any
-
maxSRCCPUMemory: any
-
mouse
Invert Zooming Direction: any -
navigation
Mode: any -
navigation
Sampling: any -
navigation
Speed Factor: any -
navigation
Speed Throttle Factor: any -
pre
Selection Color: any -
projection
Type: any -
render
Aux On Top: any -
render
Mode: any -
render
Service Canvas Ratio: any -
render
Setup: any -
screen
Space Coverage Calculation Method: any -
selection
Color: any -
show
Aux On Navigation: any -
silhouette
Effect: any -
silhouette
Effect Color: any -
silhouette
Effect Exclusive Enabled: any -
small
Feature Culling: any -
small
Feature Pixel Threshold: any -
soc: any
-
spacemouse
Multiplier: any -
topo
Geometry Color: any -
topo
Geometry Secondary Color: any -
topo
Points Enabled: any -
turntable
Lower Vertical Limit: any -
turntable
Upper Vertical Limit: any -
turntable
Vertical Limits Enabled: any -
use
Device Pixel Ratio: any -
vertex
Colors Enabled: any -
view
Perspective: any -
webgl
Preserve Drawingbuffer: any
-
Returns ViewerAPI
-
disable Capping
disconnect From Session
enable Capping
end Explosion
enterXRMember Init Mode
- enterXRMember
Init Mode(memberId: number, xrInitOptions?: XRInitOptions): Promise<boolean> Experimental
Enters the initialization phase for modeltracking. This is also used to reset the current modeltracking. It will also trigger a XRMemberStateChangedEvent event with XRState.FIXATED set to false. By default the modeltracking will be softreset. If you choose to reset different data on the modeltracker you can do so by specifying the XRInitOptions.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
-
Optional
xrInitOptions: XRInitOptionsSpecify initialization options. E.g. reset behavior of modeltracker. Default is softreset.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
exitXRMember Init Mode
- exitXRMember
Init Mode(memberId: number): Promise<boolean> Experimental
Exits the initialization phase for modeltracking, this will also anchor the model at the current position.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
exportXRInit Template
- exportXRInit
Template(memberId: number): Promise<string> Experimental
Exports init template for modeltracking. Usage: After a successful tracking session, the learned init template data can be exported with this function and stored for later.
Only supported if the XRMember has the MODELTRACKER capability.
The aquired data can be imported via importXRInitTemplate function
Parameters
-
memberId: number
the XRMember that the operation should be applied on
Returns Promise<string>
base64 encoded init template data
-
fetch Attachment Data
fixateXRMember
- fixateXRMember(memberId: number): Promise<boolean>
Experimental
Anchors the model at the current position. It will also trigger a XRMemberStateChangedEvent event with XRState.FIXATED set to true.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
get Annotation Data
- get
Annotation Data(annotationID: number): AnnotationData -
Parameters
-
annotationID: number
Returns AnnotationData
The content and properties of an annotation.
-
get Annotations
get Attachment Data
- get
Attachment Data<T>(attachmentID?: number): T -
Returns the attachment data.
Deprecated
getAttachmentData is deprecated, please use fetchAttachmentData instead.
Type Parameters
-
T = any
Parameters
-
Optional
attachmentID: numberSpecifies the attachment object.
Returns T
The attached data
-
get Attachment DataURI
get Clip Planes
get Clip Room
get Collection
- get
Collection(collectionID: number): ICollection -
Parameters
-
collectionID: number
Returns ICollection
-
get Collection Elements
- get
Collection Elements(collectionID: number): Promise<number[]> -
Returns an array containing the ids of the nodes in the collection. Modifying the returned array results in undefined behavior.
READONLY
Parameters
-
collectionID: number
The id of the node collection
Returns Promise<number[]>
Array of node IDs representing the node collection
-
get Collection Node Count
get Drawing Plane Data
- get
Drawing Plane Data(drawingPlaneId: number): DrawingPlaneProperties Experimental
Returns the DrawingPlane properties for the specified DrawingPlane ID.
Parameters
-
drawingPlaneId: number
The ID of the DrawingPlane you want to get the Data for.
Returns DrawingPlaneProperties
The requested DrawingPlane properties.
-
get Drawing Planes
get Drawings
get Enabled Aux Nodes
- get
Enabled Aux Nodes(nodeID?: number): Promise<number[]> -
Deprecated
This function will no longer be available in future webvis releases
Traverses the subtree of a given nodeID and collects all enabled aux Nodes.
Parameters
-
Optional
nodeID: numberSpecifies the entry point of the subtree traversal (default: 0)
Returns Promise<number[]>
An Array of all enabled aux Node id's
-
get Enabled Layer Filters
get Interaction Mode
- get
Interaction Mode(): InteractionMode -
Returns the current Interaction mode.
Returns InteractionMode
The current Interaction mode.
get Measurement Data
- get
Measurement Data(measurementID: number): MeasurementData -
Parameters
-
measurementID: number
The ID of the Measurement.
Returns MeasurementData
The MeasurementData.
-
get Measurements
get Metadata
get Name
get Properties
- get
Properties<T>(nodeID: number, properties: T[]): Promise<PropertyType<T>[]> -
Returns the values of the properties on the Node with the matching id.
Type Parameters
-
T extends string
Parameters
-
nodeID: number
The id of the Node whose properties should be read.
-
properties: T[]
The names of the properties whose value should be read.
Returns Promise<PropertyType<T>[]>
The retrieved values of the Node's properties.
-
get Property
- get
Property<T>(nodeID: number, property: T): Promise<PropertyType<T>> -
Returns the value of the property on the Node with the matching id.
Type Parameters
-
T extends string
Parameters
-
nodeID: number
The id of the Node whose property should be read.
-
property: T
The name of the property whose value should be read.
Returns Promise<PropertyType<T>>
The retrieved value of the Node property.
-
get Registered Layer Filters
get Root Node Id
- get
Root Node Id(target: number | TopologyHandle, includeTarget?: boolean): number -
Returns the root Node id of the given Node or Topology Element.
- The root Node id of the given Node id or Topology handle.
Parameters
-
target: number | TopologyHandle
Specifies the target Node or Topology Element.
-
Optional
includeTarget: booleanControls if the target Node itself can be returned as root Node. If set to false and a root Node id is passed in, it returns the next higher root Node id.
Returns number
get Selected Leaf Nodes
get Selected Nodes
get Selected Topology Handles
- get
Selected Topology Handles(): TopologyHandle[] -
Returns a list of all selected topology elements.
Returns TopologyHandle[]
A List of all selected Topology elements.
get Selection
- get
Selection(): Promise<number[]> -
Returns a list of all selected nodes.
Deprecated
getSelection is deprecated, please use getSelectedNodes instead.
Returns Promise<number[]>
An array which contains the IDs of all leaf Nodes in the current Selection.
get Session MemberID
get Session Members
get Session State Data
get Snapshot Data
- get
Snapshot Data(snapshotID: number): { attachmentID: number; name: string; order: number } -
Deprecated
getSnapshotData is deprecated, please use requestSnapshotData instead.
Parameters
-
snapshotID: number
Returns { attachmentID: number; name: string; order: number }
The data of the specified Snapshot.
-
attachmentID: number
-
name: string
-
order: number
-
get Snapshots
get Statistics
- get
Statistics(nodeType?: NodeType, nodeID?: number): Promise<any> -
Traverses the subtree of a given nodeID and collects all statistics (currently only available for AUX-Nodes).
Parameters
-
Optional
nodeType: NodeTypeSpecifies the target Node type.
-
Optional
nodeID: numberSpecifies the entry point of the subtree traversal (default: 0).
Returns Promise<any>
An Object of Type/Count pairs.
-
get Topology Type
- get
Topology Type(handle: TopologyHandle): TopologyType -
Returns the type of the given topology element
Parameters
-
handle: TopologyHandle
The TopologyHandle.
Returns TopologyType
The type of the given topology element
-
get Viewer
get Viewers
getXRMember Info
- getXRMember
Info(memberId: number): XRMemberInfo Experimental
Get the XRMemberInfo for a given XRMember.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns XRMemberInfo
Returns an XRMemberInfo struct containing all relevant infos (memberId, XRCapabilities, sessionMemberData) for the given member.
-
getXRMember State
- getXRMember
State(memberId: number): XRMemberState Experimental
Get the runtime state of a given XRMember.
Parameters
-
memberId: number
The XRMember that the state should be queried from.
Returns XRMemberState
Returns either the member state if the member exist or return undefined if XR is not connected or the memberId does not exist.
-
getXRMembers
getXRSession State
- getXRSession
State(): XRSessionState Experimental
Get the current XRSessionState. This method can be used to check if the XR session is currently connected.
Returns XRSessionState
Returns the current XRSessionState.
import Config
- import
Config(config: { aaSetting: any; additionalCookies: any; additionalRequestHeaders: any; additionalWSQueryParameters: any; auxModeRecursiveSearch: any; auxModeUncolorFacesOnLeave: any; backgroundColor: any; boosterURL: any; cappingEffectEdgeColor: any; cappingEffectEnabled: any; cappingEffectInnerColor: any; cappingGeometryColor: any; colorComparisonFirstColor: any; colorComparisonMatchingColor: any; colorComparisonSecondColor: any; colorizeEffect: any; contextMenuFunction: any; coordSys: any; defaultFieldOfView: any; defaultQueryLinkDepth: any; disableDefaultInteraction: any; disableSpecularHighlights: any; doubleClickAnimationVolumeScale: any; doubleClickTimeWindow: any; drawingColor: any; drawingMode: any; drawingSize: any; dynamicAuxContrastEnabled: any; dynamicCOREnabled: any; dynamicClippingDistance: any; dynamicClippingEnabled: any; expandOnViewerSelection: any; faceHighlightColor: any; faceSelectionColor: any; fitViewFactor: any; flyNavigationSpeed: any; flyToOnDoubleClick: any; focusOnDoubleClick: any; frustumCulling: any; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: any; hoverColor: any; hubURL: any; initView: any; initialFit: any; initialStateActivation: any; lightingEnvironment: any; lineHighlightColor: any; lineSelectionColor: any; loadRemoteConfigFile: any; logLevel: any; maxActiveSceneVolumeDiameter: any; maxConcurrentDownloads: any; maxDynamicClipDistance: any; maxGPUMemory: any; maxSRCCPUMemory: any; measurementAngularTolerance: any; measurementMaterialDensities: any; mouseInvertZoomingDirection: any; navigationMode: any; navigationSampling: any; navigationSpeedFactor: any; navigationSpeedThrottleFactor: any; notificationLogLevels: any; parentSelectEnabled: any; preSelectionColor: any; preferXHRWithCredentials: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: any; renderSetup: any; screenSpaceCoverageCalculationMethod: any; selectionColor: any; sessionDeviceTags: any; sessionForwardUrl: any; sessionInteractions: any; sessionMemberName: any; showAuxOnNavigation: any; silhouetteEffect: any; silhouetteEffectColor: any; silhouetteEffectExclusiveEnabled: any; skipSslVerify: any; slamProviderType: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; snapshotContentSelection: any; soc: any; spacemouseMultiplier: any; topoGeometryColor: any; topoGeometrySecondaryColor: any; topoPointsEnabled: any; turntableLowerVerticalLimit: any; turntableUpperVerticalLimit: any; turntableVerticalLimitsEnabled: any; uriMap: any; useDevicePixelRatio: any; vertexColorsEnabled: any; viewPerspective: any; webglPreserveDrawingbuffer: any; xrEnabled: any }): void -
Applies the specified set of settings to the context.
Parameters
-
config: { aaSetting: any; additionalCookies: any; additionalRequestHeaders: any; additionalWSQueryParameters: any; auxModeRecursiveSearch: any; auxModeUncolorFacesOnLeave: any; backgroundColor: any; boosterURL: any; cappingEffectEdgeColor: any; cappingEffectEnabled: any; cappingEffectInnerColor: any; cappingGeometryColor: any; colorComparisonFirstColor: any; colorComparisonMatchingColor: any; colorComparisonSecondColor: any; colorizeEffect: any; contextMenuFunction: any; coordSys: any; defaultFieldOfView: any; defaultQueryLinkDepth: any; disableDefaultInteraction: any; disableSpecularHighlights: any; doubleClickAnimationVolumeScale: any; doubleClickTimeWindow: any; drawingColor: any; drawingMode: any; drawingSize: any; dynamicAuxContrastEnabled: any; dynamicCOREnabled: any; dynamicClippingDistance: any; dynamicClippingEnabled: any; expandOnViewerSelection: any; faceHighlightColor: any; faceSelectionColor: any; fitViewFactor: any; flyNavigationSpeed: any; flyToOnDoubleClick: any; focusOnDoubleClick: any; frustumCulling: any; gizmoScalingFactor: any; gizmosEnabled: any; gpuMemoryReleaseFactor: any; hoverColor: any; hubURL: any; initView: any; initialFit: any; initialStateActivation: any; lightingEnvironment: any; lineHighlightColor: any; lineSelectionColor: any; loadRemoteConfigFile: any; logLevel: any; maxActiveSceneVolumeDiameter: any; maxConcurrentDownloads: any; maxDynamicClipDistance: any; maxGPUMemory: any; maxSRCCPUMemory: any; measurementAngularTolerance: any; measurementMaterialDensities: any; mouseInvertZoomingDirection: any; navigationMode: any; navigationSampling: any; navigationSpeedFactor: any; navigationSpeedThrottleFactor: any; notificationLogLevels: any; parentSelectEnabled: any; preSelectionColor: any; preferXHRWithCredentials: any; projectionType: any; renderAuxOnTop: any; renderMode: any; renderServiceCanvasRatio: any; renderSetup: any; screenSpaceCoverageCalculationMethod: any; selectionColor: any; sessionDeviceTags: any; sessionForwardUrl: any; sessionInteractions: any; sessionMemberName: any; showAuxOnNavigation: any; silhouetteEffect: any; silhouetteEffectColor: any; silhouetteEffectExclusiveEnabled: any; skipSslVerify: any; slamProviderType: any; smallFeatureCulling: any; smallFeaturePixelThreshold: any; snapshotContentSelection: any; soc: any; spacemouseMultiplier: any; topoGeometryColor: any; topoGeometrySecondaryColor: any; topoPointsEnabled: any; turntableLowerVerticalLimit: any; turntableUpperVerticalLimit: any; turntableVerticalLimitsEnabled: any; uriMap: any; useDevicePixelRatio: any; vertexColorsEnabled: any; viewPerspective: any; webglPreserveDrawingbuffer: any; xrEnabled: any }
Settings to import
-
aa
Setting: any -
additional
Cookies: any -
additional
Request Headers: any -
additionalWSQuery
Parameters: any -
aux
Mode Recursive Search: any -
aux
Mode Uncolor Faces On Leave: any -
background
Color: any -
boosterURL: any
-
capping
Effect Edge Color: any -
capping
Effect Enabled: any -
capping
Effect Inner Color: any -
capping
Geometry Color: any -
color
Comparison First Color: any -
color
Comparison Matching Color: any -
color
Comparison Second Color: any -
colorize
Effect: any -
context
Menu Function: any -
coord
Sys: any -
default
Field Of View: any -
default
Query Link Depth: any -
disable
Default Interaction: any -
disable
Specular Highlights: any -
double
Click Animation Volume Scale: any -
double
Click Time Window: any -
drawing
Color: any -
drawing
Mode: any -
drawing
Size: any -
dynamic
Aux Contrast Enabled: any -
dynamicCOREnabled: any
-
dynamic
Clipping Distance: any -
dynamic
Clipping Enabled: any -
expand
On Viewer Selection: any -
face
Highlight Color: any -
face
Selection Color: any -
fit
View Factor: any -
fly
Navigation Speed: any -
fly
To On Double Click: any -
focus
On Double Click: any -
frustum
Culling: any -
gizmo
Scaling Factor: any -
gizmos
Enabled: any -
gpu
Memory Release Factor: any -
hover
Color: any -
hubURL: any
-
init
View: any -
initial
Fit: any -
initial
State Activation: any -
lighting
Environment: any -
line
Highlight Color: any -
line
Selection Color: any -
load
Remote Config File: any -
log
Level: any -
max
Active Scene Volume Diameter: any -
max
Concurrent Downloads: any -
max
Dynamic Clip Distance: any -
maxGPUMemory: any
-
maxSRCCPUMemory: any
-
measurement
Angular Tolerance: any -
measurement
Material Densities: any -
mouse
Invert Zooming Direction: any -
navigation
Mode: any -
navigation
Sampling: any -
navigation
Speed Factor: any -
navigation
Speed Throttle Factor: any -
notification
Log Levels: any -
parent
Select Enabled: any -
pre
Selection Color: any -
preferXHRWith
Credentials: any -
projection
Type: any -
render
Aux On Top: any -
render
Mode: any -
render
Service Canvas Ratio: any -
render
Setup: any -
screen
Space Coverage Calculation Method: any -
selection
Color: any -
session
Device Tags: any -
session
Forward Url: any -
session
Interactions: any -
session
Member Name: any -
show
Aux On Navigation: any -
silhouette
Effect: any -
silhouette
Effect Color: any -
silhouette
Effect Exclusive Enabled: any -
skip
Ssl Verify: any -
slam
Provider Type: any -
small
Feature Culling: any -
small
Feature Pixel Threshold: any -
snapshot
Content Selection: any -
soc: any
-
spacemouse
Multiplier: any -
topo
Geometry Color: any -
topo
Geometry Secondary Color: any -
topo
Points Enabled: any -
turntable
Lower Vertical Limit: any -
turntable
Upper Vertical Limit: any -
turntable
Vertical Limits Enabled: any -
uri
Map: any -
use
Device Pixel Ratio: any -
vertex
Colors Enabled: any -
view
Perspective: any -
webgl
Preserve Drawingbuffer: any -
xr
Enabled: any
-
Returns void
-
import Session
importXRInit Template
- importXRInit
Template(memberId: number, template: string): Promise<void> Experimental
Imports init template for modeltracking. When using Model tracking, Init templates are captured during the tracking process. This initialization data is linked to previously visited view-points along the traveled camera path. Once the tracking is lost the templates are used to quickly reinitialize from similar view-points without the user having to align the line model with the real object.
Once the init template data is imported. It will stay until enterInitMode with resetInitTemplate set to true is called.
Only supported if the XRMember has the MODELTRACKER capability.
The input data can be aquired via exportXRInitTemplate function
Parameters
-
memberId: number
the XRMember that the operation should be applied on
-
template: string
Returns Promise<void>
-
invert Enabled States
invert Selection
- invert
Selection(silent?: boolean): Promise<ChangeSelectionResult> -
Inverts the current Selection.
Parameters
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
is Color Comparison Active
is Node Deletable
is Node Part Of Enabled Layers
is Node Part Of Enabled Variant
is Node Type
is Offline Storage Available
is Selected
is Topology Selected
- is
Topology Selected(handle: TopologyHandle): boolean -
Checks if the specified Topology Element is part of the current selection.
Parameters
-
handle: TopologyHandle
The topology element which should be checked if it selected.
Returns boolean
A boolean value which indicates if the specified Topology Element is part of the current selection or not.
-
map Internal To Original Topology Handles
- map
Internal To Original Topology Handles(handles: TopologyHandle[]): Promise<OriginalTopologyHandle[]> -
Maps the given webvis internal topology handles to original topology handles.
Parameters
-
handles: TopologyHandle[]
A list of webvis internal topology handles.
Returns Promise<OriginalTopologyHandle[]>
Promise<Array<OriginalTopologyHandle|undefined>> - A list of the corresponding original topology handles.
-
map Original To Internal Topology Handles
- map
Original To Internal Topology Handles(nodeID: number, handles: OriginalTopologyHandle[]): Promise<TopologyHandle[]> -
Maps the given original topology handles to webvis internal topology handles.
Parameters
-
nodeID: number
The Node which specifies the Part the topology relates to.
-
handles: OriginalTopologyHandle[]
A list of original topology handles.
Returns Promise<TopologyHandle[]>
Promise<Array<TopologyHandle|undefined>> - A list of the corresponding webvis internal topology handles.
-
measure Tangent
- measure
Tangent(measurementDescriptor: MeasurementDescriptor, l3dToShapeInstanceIDMap: Map<number, number[]>): Promise<TangentMeasurementResult> -
Parameters
-
measurementDescriptor: MeasurementDescriptor
-
l3dToShapeInstanceIDMap: Map<number, number[]>
Returns Promise<TangentMeasurementResult>
-
perform Explosion
process Interaction Input
- process
Interaction Input(interactionData: InteractionData): void -
Triggers an interaction on the current active interaction mode.
Parameters
-
interactionData: InteractionData
Definition of the triggered Interaction.
Returns void
-
promote Session Member
query
- query(query: string | Query, nodeID?: number): Promise<QueryResult>
-
Executes the query on the specified subtree
Parameters
-
query: string | Query
-
Optional
nodeID: number
Returns Promise<QueryResult>
-
read Setting
register Custom Property
- register
Custom Property(name: string, defaultValue: any, recursive?: boolean): void -
Registering a new custom property.
Parameters
-
name: string
The name of the new property.
-
defaultValue: any
Specifies the default value.
-
Optional
recursive: booleanDefines whether the property is recursive.
Returns void
-
register Frame Listener
- register
Frame Listener(listener: FrameListener): void -
Registers a listener function which get called once per internal update tick.
Parameters
-
listener: FrameListener
The listener to register.
Returns void
-
register Listener
- register
Listener<T>(eventTypes: EventType[], listener: IEventListener<T>, nodeID?: number, observeSubTree?: boolean): number -
Registers the
listener
to the node with the matchingnodeID
and returns the id of the listener. TheobserveSubTree
flag allows to observe the whole subtree under the respective node with thelistener
. With theeventTypes
array, you can specify the types of events the listener should be reacting on. If an empty array is passed, the listener will react on all event types.Type Parameters
-
T extends WebVisEvent<T> = WebVisEvent
Parameters
-
eventTypes: EventType[]
The kind of events on which the event listener should listen.
-
listener: IEventListener<T>
The event listener.
-
Optional
nodeID: numberThe id of the node on which the event listener should be registered.
-
Optional
observeSubTree: booleanIndicates whether the event listener should also listen to events in all child nodes. This has an effect on NODE_* events only.
Returns number
The id of the event listener.
-
remove
remove Animation Frames
remove Annotation
remove Attachment
remove Capping
remove Clip Plane
remove Clipping Room
remove Collection
remove Drawing
- remove
Drawing(drawingId: number, force?: boolean): RemoveDrawingState -
Removes a Drawing with the specified id. If a Drawing is part of a Snapshot the removal will fail with the State RemoveDrawingState.PART_OF_SNAPSHOT
Parameters
-
drawingId: number
The id of the to be removed Drawing.
-
Optional
force: booleanForces the removal of the Drawing even if the Drawing is part of one or more Snapshots.
Returns RemoveDrawingState
-
remove Drawing Plane
- remove
Drawing Plane(drawingPlaneId: number, force?: boolean): RemoveDrawingPlaneState Experimental
Removes a DrawingPlane with the specified ID. If a DrawingPlane is part of a Snapshot the removal will fail with the State RemoveDrawingPlaneState.PART_OF_SNAPSHOT
Parameters
-
drawingPlaneId: number
The ID of the Drawing you want to remove.
-
Optional
force: booleanForces the removal of the DrawingPlane even if the Drawing is part of one or more Snapshots.
Returns RemoveDrawingPlaneState
-
remove From Collection
- remove
From Collection(collectionID: number, nodeID: number, recursive?: boolean): void -
Removes a node given by nodeID from the collection with id collectionID. If recursive is true, the descendants of the node are also removed.
Parameters
-
collectionID: number
Specifies from which collection the node should be removed
-
nodeID: number
Specifies which node should be removed from the collection
-
Optional
recursive: booleanSpecifies whether the children of the node should be removed from the collection too
Returns void
-
remove From Selection
- remove
From Selection(nodeID: number | number[], silent?: boolean): Promise<ChangeSelectionResult> -
Removes the given nodes from the Selection
Parameters
-
nodeID: number | number[]
The ID of the Node that should be removed from the current Selection
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
remove Measurement
remove Session Member
remove Snapshot
remove Topology From Selection
- remove
Topology From Selection(handle: TopologyHandle | TopologyHandle[]): Promise<void> -
Removes one or multiple Topology elements to the current selection.
Parameters
-
handle: TopologyHandle | TopologyHandle[]
A Topology Element or a list of Topology Elements which should be removed from the current selection.
Returns Promise<void>
-
remove Viewer
request Active Scene Volume
request Additional Measurement Data
request Aux Root Node Ids
request Clip Plane Data
- request
Clip Plane Data(clipPlaneId: number): Promise<ClipPlaneProperties> -
Returns the ClipPlaneData for the specified clip plane id.
Parameters
-
clipPlaneId: number
The id of the clip plane you want to request the data for.
Returns Promise<ClipPlaneProperties>
The requested clip plane data.
-
request Clip Room Data
- request
Clip Room Data(): Promise<ClipRoomProperties> -
Returns the ClipRoomData.
Returns Promise<ClipRoomProperties>
The requested clip room data.
request Drawing Data
- request
Drawing Data(drawingId: number): Promise<DrawingData> -
Returns the DrawingData for the specified Drawing id.
Parameters
-
drawingId: number
The id of the Drawing from which the data is requested.
Returns Promise<DrawingData>
The requested Drawing data.
-
request Full Scene Volume
request L3DInformation
request Node Ids By Box Volume
- request
Node Ids By Box Volume(boxVolume: BoxVolume, includeOverlappingNodes?: boolean, includeDisabledNodes?: boolean, forceExpand?: boolean, scopeNodeId?: number): Promise<number[]> -
Returns a List of all Node ids which are included or overlapped by the specified 3D world space Bounding Volume.
Parameters
-
boxVolume: BoxVolume
Specifies the 3D world space Bounding Volume.
-
Optional
includeOverlappingNodes: booleanSpecifies that the result should include Nodes which overlap the specified 3D world space Bounding Volume as well.
-
Optional
includeDisabledNodes: booleanSpecifies that the result should include Nodes which are disabled as well.
-
Optional
forceExpand: boolean -
Optional
scopeNodeId: numberSpecifies the top one Node id of the subtree to be searched.
Returns Promise<number[]>
List of all NodeIds which are included or overlapped by the specified 3D world space Bounding Volume.
-
request Node Path Handle Map
- request
Node Path Handle Map(paths: string[], scope?: number): Promise<NodePathHandleMap> -
requestNodePathHandleMap Returns an object mapping from input paths to the respective handles.
Parameters
-
paths: string[]
{Array<string | NodePathHandle>} The array of node path strings or handles.
-
Optional
scope: number{number} [scope=0] nodeID specifying the scope as starting point for the paths
Returns Promise<NodePathHandleMap>
The resulting object mapping paths to handles
-
request Node Path Strings
- request
Node Path Strings(handles: NodePathHandle[], scope?: number, typePriorities?: NodePathFragmentType[]): Promise<string[]> -
requestNodePathStrings Returns string representations for the respective node path handles.
Parameters
-
handles: NodePathHandle[]
{Array
} -
Optional
scope: number{number} nodeID specifying the scope as starting point for the path resolution
-
Optional
typePriorities: NodePathFragmentType[]{Array
} Array of priorities to control the fragments for the path string assembly.
Returns Promise<string[]>
String representation of the node path for the respective scope.
-
request Root Node Ids
- request
Root Node Ids(scopeNodeId?: number, recursive?: boolean): Promise<number[]> -
Returns a list of all existing root Node ids below the specified subtree.
Parameters
-
Optional
scopeNodeId: numberSpecifies the top one Node id of the subtree to be searched.
-
Optional
recursive: booleanSpecifies if the subtree is traversed recursively.
Returns Promise<number[]>
A list of root Node ids.
-
request Snapshot Data
request Supported Content Types
- request
Supported Content Types(): Promise<ContentType[]> -
Returns Promise<ContentType[]>
All supported data formats.
request Supported Render Setups
request Variants
requestXMember Capabilities
- requestXMember
Capabilities(memberId: number): Promise<boolean> Experimental
Execute whatever is necessary to enable XRCapbilities on the given member, e.g. start the camera or forward to the booster.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
resetAR
reset Interaction Mode
reset Properties
- reset
Properties<T>(nodeID: number, properties: T[]): Promise<void> -
Resets the value of the specified properties on the given Node.
Type Parameters
-
T extends string
Parameters
-
nodeID: number
The id of the Node whose property should be reset.
-
properties: T[]
List of properties which should be reset.
Returns Promise<void>
-
reset Property
- reset
Property<T>(nodeID: number, property: T): Promise<void> -
Resets the value of the property on the Node with the matching id.
Type Parameters
-
T extends string
Parameters
-
nodeID: number
The id of the Node whose property should be reset.
-
property: T
Property which should be reset.
Returns Promise<void>
-
reset Setting
- reset
Setting(setting: ViewerSettingStrings | SettingStrings): void -
Resets the value of a setting to the installation default.
Parameters
-
setting: ViewerSettingStrings | SettingStrings
The name of the setting that should be reset.
Returns void
-
reset User Settings
restore Measurement
- restore
Measurement(data: MeasurementData, measurementID?: number): number -
Parameters
-
data: MeasurementData
The MeasurementData that should be restored.
-
Optional
measurementID: numberThe ID of the restored Measurement.
Returns number
-
restore Session
restore Snapshot
- restore
Snapshot(snapshotID: number, options?: SnapshotRestoreOptions): Promise<void> -
Restores the Snapshot for the given snapshotID. The settings parameter allows to control the subset of the Snapshot data to be restored.
Parameters
-
snapshotID: number
-
Optional
options: SnapshotRestoreOptions
Returns Promise<void>
-
search By Volume
- search
By Volume(selectionBox: BoxVolume, includeOverlappingNodes: boolean, rootNodeID?: number): Promise<number> -
Finds nodes within the given BoxVolume (created using the createBoxVolume() function). If includeOverlappingNodes is false, only nodes fully contained by the box volume are returned. The rootNodeID specifies the node from which the subtree is searched.
Parameters
-
selectionBox: BoxVolume
3-dimensional search volume.
-
includeOverlappingNodes: boolean
Specifies whether the search result contains only those nodes which lie entirely in the search volume or if overlapping nodes are also included.
-
Optional
rootNodeID: numberRestricts the search to a subtree of a node with the given id.
Returns Promise<number>
A the id of the created collection of nodes that are fitting the given search criteria.
-
select Collection
- select
Collection(collectionID: number, silent?: boolean): Promise<void | ChangeSelectionResult> -
Replaces the current Selection with the Nodes from the given Collection.
Parameters
-
collectionID: number
The ID of the Collection.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<void | ChangeSelectionResult>
-
set Attachment Data
set Attachment DataURI
set Interaction Mode
- set
Interaction Mode(mode: string | string[], keepColorCompareActive?: boolean): void -
Set the current interaction mode.
Deprecated
Calling setInteractionMode with the mode parameter of type string or string[] is deprecated, please use the InteractionMode enum instead.
Parameters
-
mode: string | string[]
Specifies the interaction mode you want set.
-
Optional
keepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. (Default: false)
Returns void
-
- set
Interaction Mode(mode: InteractionMode, keepColorCompareActive?: boolean): void -
Set the current interaction mode.
Parameters
-
mode: InteractionMode
Specifies the interaction mode you want set.
-
Optional
keepColorCompareActive: booleanSpecifies if the color comparison mode should stay active. (Default: false)
Returns void
-
set Layer Filter Enabled
- set
Layer Filter Enabled(name: string, enabled: boolean): SetLayerFilterEnabledResult -
Sets layers to enabled whose names are in the array of names.
Parameters
-
name: string
The name of the LayerFilter
-
enabled: boolean
The new enabled state.
Returns SetLayerFilterEnabledResult
-
set Parent
set Property
- set
Property<T>(nodeID: number | number[], property: T, value: PropertyType<T>, silent?: boolean): Promise<void> -
Sets the property named property to value on the Node with id nodeID.
Type Parameters
-
T extends string
Parameters
-
nodeID: number | number[]
The id of the Node whose property has to be set.
-
property: T
The name of the property that has to be set.
-
value: PropertyType<T>
The new value of the specified property.
-
Optional
silent: booleanThe silent flag indicates that no NODE_CHANGED event is fired.
Returns Promise<void>
-
set Selection
- set
Selection(nodeID: number | number[], silent?: boolean): Promise<ChangeSelectionResult> -
Replaces the current Selection with the specified nodes.
Parameters
-
nodeID: number | number[]
The nodeID(s) to select.
-
Optional
silent: booleanIf set to true, no event will be emitted.
Returns Promise<ChangeSelectionResult>
-
set Topology Property
- set
Topology Property<T>(handle: TopologyHandle | TopologyHandle[], property: T, value: TopologyPropertyTypeMap[T]): Promise<PromiseSettledResult<void>[]> -
Sets a Property of one or multiple Topology Elements.
Type Parameters
-
T extends keyof TopologyPropertyTypeMap
Parameters
-
handle: TopologyHandle | TopologyHandle[]
-
property: T
The property which should be set.
-
value: TopologyPropertyTypeMap[T]
Returns Promise<PromiseSettledResult<void>[]>
-
set Topology Selection
- set
Topology Selection(handle: TopologyHandle | TopologyHandle[]): Promise<void> -
Selects the specified Topology Elements.
Parameters
-
handle: TopologyHandle | TopologyHandle[]
A Topology Element or a list of Topology Elements to select.
Returns Promise<void>
-
set Variant Enabled
setXRFusion Mode
- setXRFusion
Mode(memberId: number, xrFusionMode: XRFusionMode): Promise<boolean> Experimental
Sets the passed fusion mode for the given XRMember. The fusion mode determines which inputs will be used for the final visualization.
Parameters
-
memberId: number
the XRMember that the operation should be applied on
-
xrFusionMode: XRFusionMode
the fusion mode that should be set
Returns Promise<boolean>
returns a Promise which reports whether the operation was successful or not
-
setXRMember Settings
- setXRMember
Settings(memberId: number, settings: XRMemberSettings): Promise<boolean> Experimental
This will change the XRMemberSettings for the specified XRMember.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
-
settings: XRMemberSettings
The quality threshold for the modeltracker must be between 0 and 1
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
show Expert Dialog
shutdown Session
startAR
- startAR(): Promise<boolean>
-
Deprecated
Start AR. Projects the camera stream in the background and starts searching for the given reference. The reference is defined by setting the realproperty on the particular node via the webvis API. E.g. webvis.setProperty(0, pluginAPI.realProperty, pluginAPI.realState.Enabled)
Returns Promise<boolean>
returns true if starting was successfull or false if it could not start AR
startXRMember Spectate
- startXRMember
Spectate(memberId: number): Promise<boolean> Experimental
Puts the image stream in the background of the renderer. It will also trigger a XRMemberStateChangedEvent event with XRState.FOLLOWING set to true.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
stopAR
stopXRMember Spectate
- stopXRMember
Spectate(memberId: number): Promise<boolean> Experimental
Stops the image stream in the background of the renderer. It will also trigger a XRMemberStateChangedEvent event with XRState.FOLLOWING set to false.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
store Session
- store
Session(offline?: boolean, progressCallback?: StoreSessionProgressCallback): Promise<string | void> -
Temporarily stores the Session in the infrastructure and returns a handle.
Parameters
-
Optional
offline: booleansets the space domain to the local one
-
Optional
progressCallback: StoreSessionProgressCallback
Returns Promise<string | void>
-
unfixateXRMember
- unfixateXRMember(memberId: number): Promise<boolean>
Experimental
Unfixates the model. The model will move with the device. It will also trigger a XRMemberStateChangedEvent event with XRState.FIXATED set to false.
Parameters
-
memberId: number
The XRMember that the operation should be applied on.
Returns Promise<boolean>
Returns a Promise which reports whether the operation was successful or not.
-
unregister Frame Listener
- unregister
Frame Listener(listener: FrameListener): void -
Unregisters a previously registered listener via registerFrameListener.
Parameters
-
listener: FrameListener
The listener to unregister.
Returns void
-
unregister Listener
wait For
- wait
For(state: ContextState): Promise<void> -
Register a callback to a specific state. The callback is executed once when the state is reached. If webVis is already in that state the callback is triggered immediately.
The following states are allowed as target
init
- Is reached when webVis is fully configured and set up.
resourceStateUpdated
- Is reached when there is state information available for all resources (This information can also be "still transcoding").
resourceProcessed
- This is triggered when all resources are done transcoding.
renderingFinished
- This is triggered when webVis is done with rendering. So no more image changes are imminent.Parameters
-
state: ContextState
The state for which a callback is registered
Returns Promise<void>
A promise which throws an error if the requested state is invalid
-
The ContextAPI combines all functionality which can be applied on the WebvisContext.