.. role:: clio-deprecated
   :class: clio-flag clio-flag-deprecated

.. role:: clio-readonly
   :class: clio-flag clio-flag-readonly

.. role:: clio-static
   :class: clio-flag clio-flag-static


#########
WebViewer
#########

.. js:class:: wv.WebViewer

   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.WebViewer.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.WebViewer._views`
   * :js:data:`~wv.WebViewer.animationManager`
   * :js:data:`~wv.WebViewer.BCFManager`
   * :js:data:`~wv.WebViewer.cuttingManager`
   * :js:data:`~wv.WebViewer.explodeManager`
   * :js:data:`~wv.WebViewer.lineManager`
   * :js:data:`~wv.WebViewer.markupManager`
   * :js:data:`~wv.WebViewer.measureManager`
   * :js:data:`~wv.WebViewer.model`
   * :js:data:`~wv.WebViewer.noteTextManager`
   * :js:data:`~wv.WebViewer.selectionManager`
   * :js:data:`~wv.WebViewer.sheetManager`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.WebViewer.defaultEngineBinary`
   * :js:func:`~wv.WebViewer.defaultEnginePath`
   * :js:func:`~wv.WebViewer.floorplanManager`
   * :js:func:`~wv.WebViewer.operatorManager`
   * :js:func:`~wv.WebViewer.overlayManager`
   * :js:func:`~wv.WebViewer.view`
   * :js:func:`~wv.WebViewer.views`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.WebViewer.addView`
   * :js:meth:`~wv.WebViewer.advanceExportToSvg`
   * :js:meth:`~wv.WebViewer.applyFilter`
   * :js:meth:`~wv.WebViewer.beginExportToSvg`
   * :js:meth:`~wv.WebViewer.closeConnection`
   * :js:meth:`~wv.WebViewer.delayCapping`
   * :js:meth:`~wv.WebViewer.endExportToSvg`
   * :js:meth:`~wv.WebViewer.exportToSvg`
   * :js:meth:`~wv.WebViewer.fitWorld`
   * :js:meth:`~wv.WebViewer.focusInput`
   * :js:meth:`~wv.WebViewer.getAllowHighDpi`
   * :js:meth:`~wv.WebViewer.getContextMenuStatus`
   * :js:meth:`~wv.WebViewer.getFormatVersionString`
   * :js:meth:`~wv.WebViewer.getMinimumFramerate`
   * :js:meth:`~wv.WebViewer.getModelReady`
   * :js:meth:`~wv.WebViewer.getRendererType`
   * :js:meth:`~wv.WebViewer.getSceneReady`
   * :js:meth:`~wv.WebViewer.getStatistics`
   * :js:meth:`~wv.WebViewer.getStreamCutoffScale`
   * :js:meth:`~wv.WebViewer.getStreamingMode`
   * :js:meth:`~wv.WebViewer.getView`
   * :js:meth:`~wv.WebViewer.getViewElement`
   * :js:meth:`~wv.WebViewer.getViewerVersionString`
   * :js:meth:`~wv.WebViewer.moveToWindow`
   * :js:meth:`~wv.WebViewer.pauseRendering`
   * :js:meth:`~wv.WebViewer.redraw`
   * :js:meth:`~wv.WebViewer.registerCustomOperator`
   * :js:meth:`~wv.WebViewer.removeView`
   * :js:meth:`~wv.WebViewer.reset`
   * :js:meth:`~wv.WebViewer.resetClientTimeout`
   * :js:meth:`~wv.WebViewer.resizeCanvas`
   * :js:meth:`~wv.WebViewer.resumeRendering`
   * :js:meth:`~wv.WebViewer.selectPart`
   * :js:meth:`~wv.WebViewer.setAllowHighDpi`
   * :js:meth:`~wv.WebViewer.setCallbacks`
   * :js:meth:`~wv.WebViewer.setClientTimeout`
   * :js:meth:`~wv.WebViewer.setContextMenuStatus`
   * :js:meth:`~wv.WebViewer.setMinimumFramerate`
   * :js:meth:`~wv.WebViewer.setServerRenderQuality`
   * :js:meth:`~wv.WebViewer.setStreamCutoffScale`
   * :js:meth:`~wv.WebViewer.setViewOrientation`
   * :js:meth:`~wv.WebViewer.shutdown`
   * :js:meth:`~wv.WebViewer.start`
   * :js:meth:`~wv.WebViewer.takeSnapshot`
   * :js:meth:`~wv.WebViewer.trigger`
   * :js:meth:`~wv.WebViewer.unregisterCustomOperator`
   * :js:meth:`~wv.WebViewer.unsetCallbacks`
   * :js:meth:`~wv.WebViewer.waitForIdle`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.WebViewer.constructor

      .. rst-class:: sig-pretty-signature
      
         | WebViewer(**inputParams**\ : :js:class:`WebViewerConfig <wv.WebViewerConfig>`\ ): :js:class:`WebViewer <wv.WebViewer>`
      
      Creates a new Web Viewer instance. You must pass in a **containerId** key with the ID of an element or a **container** element to use for your viewer. The system will create any required elements inside the supplied container.
      
      **Parameters**
      
      
         **inputParams**\ : :js:class:`WebViewerConfig <wv.WebViewerConfig>`
      
      
            object containing key-value pairs for viewer to set
      
      
      
      **Returns**\ : :js:class:`WebViewer <wv.WebViewer>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wv.WebViewer._views

      .. rst-class:: sig-pretty-signature
      
         | _views: :js:class:`IView <wv.IView>`\ []
      



.. js:data:: wv.WebViewer.animationManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | animationManager: :js:class:`Manager <wv.Animation.Manager>`
      



.. js:data:: wv.WebViewer.BCFManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | BCFManager: *BCFManager*
      



.. js:data:: wv.WebViewer.cuttingManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | cuttingManager: :js:class:`ICuttingManager <wv.ICuttingManager>`
      



.. js:data:: wv.WebViewer.explodeManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | explodeManager: :js:class:`ExplodeManager <wv.ExplodeManager>`
      



.. js:data:: wv.WebViewer.lineManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | lineManager: :js:class:`LineManager <wv.LineManager>`
      



.. js:data:: wv.WebViewer.markupManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | markupManager: :js:class:`MarkupManager <wv.MarkupManager>`
      



.. js:data:: wv.WebViewer.measureManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | measureManager: :js:class:`MeasureManager <wv.MeasureManager>`
      



.. js:data:: wv.WebViewer.model

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | model: :js:class:`IModel <wv.IModel>`
      



.. js:data:: wv.WebViewer.noteTextManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | noteTextManager: :js:class:`NoteTextManager <wv.Operators.NoteTextManager>`
      



.. js:data:: wv.WebViewer.selectionManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | selectionManager: :js:class:`SelectionManager <wv.Selection.SelectionManager>`
      



.. js:data:: wv.WebViewer.sheetManager

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | sheetManager: :js:class:`SheetManager <wv.SheetManager>`
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: wv.WebViewer.defaultEngineBinary

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | *get* defaultEngineBinary(): *unknown*
      
      **Returns**\ : *unknown*
      
      .. rst-class:: sig-pretty-signature
      
         | *set* defaultEngineBinary(**val**\ : *unknown*\ ): *void*
      
      **Parameters**
      
      
         **val**\ : *unknown*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.defaultEnginePath

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | *get* defaultEnginePath(): (*undefined* | *string*\ )
      
      **Returns**\ : (*undefined* \| *string*\ )
      
      .. rst-class:: sig-pretty-signature
      
         | *set* defaultEnginePath(**val**\ : (*undefined* | *string*\ )): *void*
      
      **Parameters**
      
      
         **val**\ : (*undefined* \| *string*\ )
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.floorplanManager

      .. rst-class:: clio-flags
      
         :clio-deprecated:`deprecated`
      
      **Deprecated**
      
      
         FloorplanManagers are now properties of Views.
      
      
      .. rst-class:: sig-pretty-signature
      
         | *get* floorplanManager(): :js:class:`FloorplanManager <wv.Floorplan.FloorplanManager>`
      
      **Deprecated**
      
      
         FloorplanManagers are now properties of Views.
      
      
      **Returns**\ : :js:class:`FloorplanManager <wv.Floorplan.FloorplanManager>`
      



.. js:method:: wv.WebViewer.operatorManager

      .. rst-class:: clio-flags
      
         :clio-deprecated:`deprecated`
      
      **Deprecated**
      
      
         OperatorManagers are now properties of Views.
      
      
      .. rst-class:: sig-pretty-signature
      
         | *get* operatorManager(): :js:class:`OperatorManager <wv.OperatorManager>`
      
      **Deprecated**
      
      
         OperatorManagers are now properties of Views.
      
      
      **Returns**\ : :js:class:`OperatorManager <wv.OperatorManager>`
      



.. js:method:: wv.WebViewer.overlayManager

      .. rst-class:: clio-flags
      
         :clio-deprecated:`deprecated`
      
      **Deprecated**
      
      
         OverlayManagers are now properties of Views.
      
      
      .. rst-class:: sig-pretty-signature
      
         | *get* overlayManager(): :js:class:`OverlayManager <wv.Overlay.OverlayManager>`
      
      **Deprecated**
      
      
         OverlayManagers are now properties of Views.
      
      
      **Returns**\ : :js:class:`OverlayManager <wv.Overlay.OverlayManager>`
      



.. js:method:: wv.WebViewer.view

      .. rst-class:: sig-pretty-signature
      
         | *get* view(): :js:class:`IView <wv.IView>`
      
      **Returns**\ : :js:class:`IView <wv.IView>`
      



.. js:method:: wv.WebViewer.views

      .. rst-class:: sig-pretty-signature
      
         | *get* views(): :js:class:`IView <wv.IView>`\ []
      
      **Returns**\ : :js:class:`IView <wv.IView>`\ []
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.WebViewer.addView

      .. rst-class:: sig-pretty-signature
      
         | addView(**config**\ : :js:class:`ViewConfig <wv.ViewConfig>`\ ): *Promise*
      
      Adds another 3D view of the scene to the page.
      
      **Parameters**
      
      
         **config**\ : :js:class:`ViewConfig <wv.ViewConfig>`
      
      
            configuration to be used for the new view.
      
      
      
      **Returns**\ : *Promise*
      
      
         A promise with the created View.
      
      



.. js:method:: wv.WebViewer.advanceExportToSvg

      .. rst-class:: sig-pretty-signature
      
         | advanceExportToSvg(): *Promise*
      
      Get the next chunk of the SVG code
      
      **Returns**\ : *Promise*
      
      
         A promise that resolves to a string containing the next chunk or undefined on completed..
      
      



.. js:method:: wv.WebViewer.applyFilter

      .. rst-class:: sig-pretty-signature
      
         | applyFilter(**filterId**\ : :js:data:`FilterId <wv.FilterId>`\ ): *void*
      
      **Parameters**
      
      
         **filterId**\ : :js:data:`FilterId <wv.FilterId>`
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.beginExportToSvg

      .. rst-class:: sig-pretty-signature
      
         | beginExportToSvg(**config**\ : :js:class:`SvgConfig <wv.SvgConfig>`\ ?): *Promise*
      
      Setup the env to export the current scene to a two-dimensional SVG representation through stream.
      
      **Parameters**
      
      
         **config**\ : :js:class:`SvgConfig <wv.SvgConfig>` = ...
      
      
            Allows customization of the resultant SVG.
      
      
      
      **Returns**\ : *Promise*
      
      
         A promise that resolves to void when the env is ready.
      
      



.. js:method:: wv.WebViewer.closeConnection

      .. rst-class:: sig-pretty-signature
      
         | closeConnection(): *void*
      
      Disconnects the network connection when in CSR mode.
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.delayCapping

      .. rst-class:: sig-pretty-signature
      
         | delayCapping(): *void*
      
      Delays capping processing by a fixed time interval.
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.endExportToSvg

      .. rst-class:: sig-pretty-signature
      
         | endExportToSvg(): *Promise*
      
      Reset the env after SVG stream export.
      
      **Returns**\ : *Promise*
      
      
         A promise that resolves to void when the env is reset.
      
      



.. js:method:: wv.WebViewer.exportToSvg

      .. rst-class:: sig-pretty-signature
      
         | exportToSvg(**config**\ : :js:class:`SvgConfig <wv.SvgConfig>`\ ?): *Promise*
      
      Exports the current scene to a two-dimensional SVG representation.
      
      **Parameters**
      
      
         **config**\ : :js:class:`SvgConfig <wv.SvgConfig>` = ...
      
      
            Allows customization of the resultant SVG.
      
      
      
      **Returns**\ : *Promise*
      
      
         A promise that resolves to the created SVG string.
      
      



.. js:method:: wv.WebViewer.fitWorld

      .. rst-class:: sig-pretty-signature
      
         | fitWorld(**duration**\ : *number*\ ?): *Promise*
      
      **Parameters**
      
      
         **duration**\ : *number* = DefaultTransitionDuration
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.focusInput

      .. rst-class:: sig-pretty-signature
      
         | focusInput(**focus**\ : *boolean*\ ): *void*
      
      Sets whether keyboard input should be directed to this Web Viewer.
      
      **Parameters**
      
      
         **focus**\ : *boolean*
      
      
            if true, the Web Viewer will be focused and accept keyboard input, otherwise it will be blurred and not accept keyboard input
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.getAllowHighDpi

      .. rst-class:: sig-pretty-signature
      
         | getAllowHighDpi(): *boolean*
      
      Gets the current value for high DPI rendering
      
      **Returns**\ : *boolean*
      
      
         current high DPI setting
      
      



.. js:method:: wv.WebViewer.getContextMenuStatus

      .. rst-class:: sig-pretty-signature
      
         | getContextMenuStatus(): *boolean*
      
      **Returns**\ : *boolean*
      
      
         boolean true if the context menu is active, false otherwise
      
      



.. js:method:: wv.WebViewer.getFormatVersionString

      .. rst-class:: sig-pretty-signature
      
         | getFormatVersionString(): *string*
      
      Returns the format version string.
      
      **Returns**\ : *string*
      
      
         string containing version information for the format.
      
      



.. js:method:: wv.WebViewer.getMinimumFramerate

      .. rst-class:: sig-pretty-signature
      
         | getMinimumFramerate(): *Promise*
      
      Gets the minimum framerate that will be maintained by the viewer. The viewer will use various culling techniques in order to maintain the value returned.
      
      **Deprecated**
      
      
         Views can have independent framerates. This should be set using ``View.getMinimumFramerate``\ .
      
      
      **Returns**\ : *Promise*
      
      
         Promise that is resolved when the operation has completed.
      
      



.. js:method:: wv.WebViewer.getModelReady

      .. rst-class:: sig-pretty-signature
      
         | getModelReady(): *boolean*
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.WebViewer.getRendererType

      .. rst-class:: sig-pretty-signature
      
         | getRendererType(): :js:data:`RendererType <wv.RendererType>`
      
      Gets the RendererType this viewer was created with.
      
      **Returns**\ : :js:data:`RendererType <wv.RendererType>`
      
      
         the render mode.
      
      



.. js:method:: wv.WebViewer.getSceneReady

      .. rst-class:: sig-pretty-signature
      
         | getSceneReady(): *boolean*
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.WebViewer.getStatistics

      .. rst-class:: sig-pretty-signature
      
         | getStatistics(**calculateTotals**\ : *boolean*\ ?): *Promise*
      
      Gets viewer statistics for the current rendered frame. Statistics marked with a (\*) below must be calculated and will not be included in the results unless the calculateTotals parameter is true. The values of these items will be cached and only updated during the next call to this method with calculateTotals set to true.
      
      **Parameters**
      
      
         **calculateTotals**\ : *boolean* = false
      
      
            Forces an update of the total count elements. Please note that repeatedly calculating these items can cause a performance impact.
      
      
      
      **Returns**\ : *Promise*
      
      
         an object containing informational key/value pairs
      
      



.. js:method:: wv.WebViewer.getStreamCutoffScale

      .. rst-class:: sig-pretty-signature
      
         | getStreamCutoffScale(): *number*
      
      Returns the scale factor that will be applied to the streaming size cutoff. An object whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff. A value of 0 disables the cutoff.
      
      **Returns**\ : *number*
      



.. js:method:: wv.WebViewer.getStreamingMode

      .. rst-class:: sig-pretty-signature
      
         | getStreamingMode(): :js:data:`StreamingMode <wv.StreamingMode>`
      
      Gets the streaming mode this viewer was created with.
      
      **Returns**\ : :js:data:`StreamingMode <wv.StreamingMode>`
      
      
         the streaming mode.
      
      



.. js:method:: wv.WebViewer.getView

      .. rst-class:: sig-pretty-signature
      
         | getView(**viewKey**\ : :js:data:`ViewKey <wv.Sc.ViewKey>`\ ): (*undefined* | :js:class:`IView <wv.IView>`\ )
      
      Gets a view with the provided key.
      
      **Parameters**
      
      
         **viewKey**\ : :js:data:`ViewKey <wv.Sc.ViewKey>`
      
      
            The key of the view to be returned.
      
      
      
      **Returns**\ : (*undefined* \| :js:class:`IView <wv.IView>`\ )
      
      
         The view, or undefined if it doesn't exist.
      
      



.. js:method:: wv.WebViewer.getViewElement

      .. rst-class:: sig-pretty-signature
      
         | getViewElement(): *HTMLDivElement*
      
      Gets the view element for this viewer. This element contains the canvas
      
      **Returns**\ : *HTMLDivElement*
      
      
         the view element
      
      



.. js:method:: wv.WebViewer.getViewerVersionString

      .. rst-class:: sig-pretty-signature
      
         | getViewerVersionString(): *string*
      
      Returns the viewer version string.
      
      **Returns**\ : *string*
      
      
         string containing version information for the viewer.
      
      



.. js:method:: wv.WebViewer.moveToWindow

      .. rst-class:: sig-pretty-signature
      
         | moveToWindow(**win**\ : *Window*\ ): *void*
      
      This method should be called when the viewer is being moved to a new window. An example use case would be opening a new pop up window.
      
      **Parameters**
      
      
         **win**\ : *Window*
      
      
            the new document that this viewer will be associated with.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.pauseRendering

      .. rst-class:: sig-pretty-signature
      
         | pauseRendering(**callback**\ : () => *void*\ ): *Promise*
      
      Pauses rendering updates for all views. This function is useful when performing large batches of updates and you would like the result to appear all at once.
      
      **Parameters**
      
      
         **callback**\ : () => *void*
      
      
            If provided, rendering will be paused, the callback will be called, and then rendering will be resumed once the callback returns or throws an exception.
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.redraw

      .. rst-class:: sig-pretty-signature
      
         | redraw(**callback**\ : () => *void*\ ): *void*
      
      Forces the viewer to perform a full redraw of all views.
      
      **Parameters**
      
      
         **callback**\ : () => *void*
      
      
            A function to be called once the draw is complete. This is provided instead of a ``Promise`` to ensure the callback is called before the start of another redraw.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.registerCustomOperator

      .. rst-class:: sig-pretty-signature
      
         | registerCustomOperator(**operator**\ : :js:class:`Operator <wv.Operators.Operator>`\ ): :js:data:`OperatorId <wv.OperatorId>`
      
      Associates a custom operator object with a system generated operatorId.
      
      **Parameters**
      
      
         **operator**\ : :js:class:`Operator <wv.Operators.Operator>`
      
      
            the ID of the operator that is to be unregistered
      
      
      
      **Returns**\ : :js:data:`OperatorId <wv.OperatorId>`
      
      
         an operatorId to be used for this operator.
      
      



.. js:method:: wv.WebViewer.removeView

      .. rst-class:: sig-pretty-signature
      
         | removeView(**view**\ : :js:class:`IView <wv.IView>`\ ): *void*
      
      Removes an existing view from the page. Note that the default view cannot be removed.
      
      **Parameters**
      
      
         **view**\ : :js:class:`IView <wv.IView>`
      
      
            The view to remove.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.reset

      .. rst-class:: sig-pretty-signature
      
         | reset(**durationCameraTransition**\ : *number*\ ?): *Promise*
      
      Reset the camera, visibility, and transforms to their default state
      
      **Parameters**
      
      
         **durationCameraTransition**\ : *number* = DefaultTransitionDuration
      
      
            the amount of time in milliseconds that the camera transition between the current and initial view should take.
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that resolves when the operation has completed.
      
      



.. js:method:: wv.WebViewer.resetClientTimeout

      .. rst-class:: sig-pretty-signature
      
         | resetClientTimeout(): *void*
      
      Resets the client timeout to the duration set with setClientTimeout.
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.resizeCanvas

      .. rst-class:: sig-pretty-signature
      
         | resizeCanvas(): *void*
      
      This method should be called after the container element is moved or resized.
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.resumeRendering

      .. rst-class:: sig-pretty-signature
      
         | resumeRendering(): *Promise*
      
      Resumes rendering for all views.
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.selectPart

      .. rst-class:: sig-pretty-signature
      
         | selectPart(**nodeId**\ : (*None* | *number*\ ), **selectionMode**\ : :js:data:`SelectionMode <wv.SelectionMode>`\ ?): :js:data:`SelectionType <wv.SelectionType>`
      
      Selects a part with the given Id.
      
      **Parameters**
      
      
         **nodeId**\ : (*None* \| *number*\ )
      
      
            nodeId of the part to select. Pass null to clear the selection.
      
      
         **selectionMode**\ : :js:data:`SelectionMode <wv.SelectionMode>` = SelectionMode.Set
      
      
      **Returns**\ : :js:data:`SelectionType <wv.SelectionType>`
      



.. js:method:: wv.WebViewer.setAllowHighDpi

      .. rst-class:: sig-pretty-signature
      
         | setAllowHighDpi(**allow**\ : *boolean*\ ): *void*
      
      Controls rendering on high DPI displays. If true, the image will be rendered at full resolution when a high-DPI display is detected. If false, the image may be rendered at a lower resolution. The default value is false. This method may be called any time during or after the sceneReady callback has triggered.
      
      **Parameters**
      
      
         **allow**\ : *boolean*
      
      
            controls the high DPI Setting.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.setCallbacks

      .. rst-class:: sig-pretty-signature
      
         | setCallbacks(**callbacks**\ : :js:class:`CallbackMap <wv.CallbackMap>`\ ): *void*
      
      Registers callbacks that will be called when their corresponding events occur.
      
      **Parameters**
      
      
         **callbacks**\ : :js:class:`CallbackMap <wv.CallbackMap>`
      
      
            object with property names set to corresponding functions to be called when the event occurs.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.setClientTimeout

      .. rst-class:: sig-pretty-signature
      
         | setClientTimeout(**timeoutDuration**\ : *number*\ , **warningTime**\ : *number*\ ): *boolean*
      
      Sets the parameters for client driven timeout monitoring. If no input is recorded for the the duration, the viewer will disconnect and free server resources. Calling this method will reset any pending timeout duration. No timeout will occur when viewing SCS Files. The default value is to disconnect after 15 minutes, with a warning issued after 14 minutes of inactivity. <br><br> <strong>Please note:</strong> Both parameters are required.
      
      **Parameters**
      
      
         **timeoutDuration**\ : *number*
      
      
            the total time in minutes of inactivity that is allowed before a timeout event occurs
      
      
         **warningTime**\ : *number*
      
      
            the number of minutes before issuing a timeoutWarning event
      
      
      
      **Returns**\ : *boolean*
      
      
         boolean value indicating whether the timeout values were sucessfully updated
      
      



.. js:method:: wv.WebViewer.setContextMenuStatus

      .. rst-class:: sig-pretty-signature
      
         | setContextMenuStatus(**isActive**\ : *boolean*\ ): *void*
      
      Sets a boolean with the status of the context menu
      
      **Parameters**
      
      
         **isActive**\ : *boolean*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.setMinimumFramerate

      .. rst-class:: sig-pretty-signature
      
         | setMinimumFramerate(**value**\ : *number*\ ): *Promise*
      
      Sets a minimum frame rate that will be maintained by all views. Views will use various culling techniques in order to maintain the value passed in.
      
      Passing ``0`` will cause the entire scene to be drawn for every frame.
      
      **Parameters**
      
      
         **value**\ : *number*
      
      
            The frame rate for the views to maintain.
      
      
      
      **Returns**\ : *Promise*
      
      
         Promise that is resolved when the operation has completed.
      
      



.. js:method:: wv.WebViewer.setServerRenderQuality

      .. rst-class:: sig-pretty-signature
      
         | setServerRenderQuality(**jpegQualityLow**\ : *number*\ , **jpegQualityHigh**\ : *number*\ , **scaleLow**\ : *number*\ , **scaleHigh**\ : *number*\ ): *void*
      
      Sets the image quality settings for the high quality and low quality server side render. The low quality settings will be applied during model interaction (camera changes, selection, etc)
      
      **Parameters**
      
      
         **jpegQualityLow**\ : *number*
      
      
            The JPEG quality of the low quality render frame
      
      
         **jpegQualityHigh**\ : *number*
      
      
            The JPEG quality of the high quality render frame
      
      
         **scaleLow**\ : *number*
      
      
            The scale factor for the low quality render frame
      
      
         **scaleHigh**\ : *number*
      
      
            The scale factor for the high quality render frame
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.setStreamCutoffScale

      .. rst-class:: sig-pretty-signature
      
         | setStreamCutoffScale(**value**\ : *number*\ ): *Promise*
      
      Specifies a scale factor that will be applied to the streaming size cutoff. An object whose projected size is lower than the cutoff will not be streamed until its projected size reaches the cutoff.
      
      This value may also be set for file-based sessions.  In that case, when loading an SCS file based assembly via XML, projected size will be calculated on a per-file basis using the bounding information provided in the XML. For additional information, refer to [[Model.loadSubtreeFromXmlBuffer]].
      
      A value of 0 will disable the cutoff.  The value should be in the interval of [0.0, 2.0].
      
      **Parameters**
      
      
         **value**\ : *number*
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.setViewOrientation

      .. rst-class:: sig-pretty-signature
      
         | setViewOrientation(**orientation**\ : :js:data:`ViewOrientation <wv.ViewOrientation>`\ , **duration**\ : *number*\ ?): *Promise*
      
      Sets the orientation of the current model view.
      
      **Parameters**
      
      
         **orientation**\ : :js:data:`ViewOrientation <wv.ViewOrientation>`
      
      
            a [[ViewOrientation]] object specifying back, front, top, etc.
      
      
         **duration**\ : *number* = DefaultTransitionDuration
      
      
            the time in milliseconds for the model to transition to the new view orientation.
      
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.shutdown

      .. rst-class:: sig-pretty-signature
      
         | shutdown(): *void*
      
      Releases the resources used by the viewer. This method should be called when the viewer is no longer needed but the page is not being reloaded.
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.start

      .. rst-class:: sig-pretty-signature
      
         | start(): *boolean*
      
      Starts the viewer and begins the loading process
      
      **Returns**\ : *boolean*
      



.. js:method:: wv.WebViewer.takeSnapshot

      .. rst-class:: sig-pretty-signature
      
         | takeSnapshot(**config**\ : :js:class:`SnapshotConfig <wv.SnapshotConfig>`\ ?): *Promise*
      
      Creates an Image of the current canvas
      
      **Parameters**
      
      
         **config**\ : :js:class:`SnapshotConfig <wv.SnapshotConfig>` = ...
      
      
      **Returns**\ : *Promise*
      



.. js:method:: wv.WebViewer.trigger

      Used to trigger Web Viewer events from operators. Refer to the overloaded method signatures for acceptable invocations of this method. Refer to [[CallbackMap]] for additional details for each event.
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"bcfLoaded"*\ , **id**\ : *number*\ , **filename**\ : *string*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"bcfLoaded"*
      
         **id**\ : *number*
      
         **filename**\ : *string*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"bcfRemoved"*\ , **id**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"bcfRemoved"*
      
         **id**\ : *number*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"handleEvent"*\ , **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`\ , **nodeIds**\ : *number*\ [], **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ [], **newMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []): *void*
      
      **Parameters**
      
      
         **name**\ : *"handleEvent"*
      
         **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`
      
         **nodeIds**\ : *number*\ []
      
         **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []
      
         **newMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"handleEventEnd"*\ , **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`\ , **nodeIds**\ : *number*\ [], **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ [], **newMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []): *void*
      
      **Parameters**
      
      
         **name**\ : *"handleEventEnd"*
      
         **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`
      
         **nodeIds**\ : *number*\ []
      
         **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []
      
         **newMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"handleEventStart"*\ , **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`\ , **nodeIds**\ : *number*\ [], **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []): *void*
      
      **Parameters**
      
      
         **name**\ : *"handleEventStart"*
      
         **eventType**\ : :js:data:`HandleEventType <wv.HandleEventType>`
      
         **nodeIds**\ : *number*\ []
      
         **initialMatrices**\ : :js:class:`Matrix <wv.Matrix>`\ []
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"cuttingPlaneDragStart"*\ , **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`\ , **planeIndex**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"cuttingPlaneDragStart"*
      
         **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`
      
         **planeIndex**\ : *number*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"cuttingPlaneDrag"*\ , **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`\ , **planeIndex**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"cuttingPlaneDrag"*
      
         **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`
      
         **planeIndex**\ : *number*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"cuttingPlaneDragEnd"*\ , **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`\ , **planeIndex**\ : *number*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"cuttingPlaneDragEnd"*
      
         **cuttingSection**\ : :js:class:`ICuttingSection <wv.ICuttingSection>`
      
         **planeIndex**\ : *number*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"cuttingSectionsLoaded"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"cuttingSectionsLoaded"*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"redlineCreated"*\ , **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"redlineCreated"*
      
         **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"redlineDeleted"*\ , **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"redlineDeleted"*
      
         **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"redlineUpdated"*\ , **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"redlineUpdated"*
      
         **redlineMarkup**\ : :js:class:`RedlineItem <wv.Markup.Redline.RedlineItem>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementBegin"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementBegin"*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementCreated"*\ , **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementCreated"*
      
         **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementDeleted"*\ , **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementDeleted"*
      
         **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementValueSet"*\ , **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementValueSet"*
      
         **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementShown"*\ , **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementShown"*
      
         **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"measurementHidden"*\ , **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"measurementHidden"*
      
         **measurement**\ : :js:class:`MeasureMarkup <wv.Operators.Markup.Measure.MeasureMarkup>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"noteTextCreated"*\ , **noteText**\ : *NoteText*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"noteTextCreated"*
      
         **noteText**\ : *NoteText*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"noteTextDeleted"*\ , **noteText**\ : *NoteText*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"noteTextDeleted"*
      
         **noteText**\ : *NoteText*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"noteTextUpdated"*\ , **noteText**\ : *NoteText*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"noteTextUpdated"*
      
         **noteText**\ : *NoteText*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"noteTextHidden"*\ , **noteText**\ : *NoteText*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"noteTextHidden"*
      
         **noteText**\ : *NoteText*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"noteTextShown"*\ , **noteText**\ : *NoteText*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"noteTextShown"*
      
         **noteText**\ : *NoteText*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"walkOperatorActivated"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"walkOperatorActivated"*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"walkOperatorDeactivated"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"walkOperatorDeactivated"*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"viewCreated"*\ , **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"viewCreated"*
      
         **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"viewDeleted"*\ , **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"viewDeleted"*
      
         **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"viewLoaded"*\ , **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"viewLoaded"*
      
         **view**\ : :js:class:`MarkupView <wv.Markup.MarkupView>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"contextMenu"*\ , **position**\ : :js:class:`Point2 <wv.Point2>`\ , **modifiers**\ : :js:data:`KeyModifiers <wv.KeyModifiers>`\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"contextMenu"*
      
         **position**\ : :js:class:`Point2 <wv.Point2>`
      
         **modifiers**\ : :js:data:`KeyModifiers <wv.KeyModifiers>`
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"beginInteraction"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"beginInteraction"*
      
      
      **Returns**\ : *void*
      
      .. rst-class:: sig-pretty-signature
      
         | trigger(**name**\ : *"endInteraction"*\ ): *void*
      
      **Parameters**
      
      
         **name**\ : *"endInteraction"*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.unregisterCustomOperator

      .. rst-class:: sig-pretty-signature
      
         | unregisterCustomOperator(**operatorId**\ : :js:data:`OperatorId <wv.OperatorId>`\ ): *void*
      
      Removes a previously registered custom operator from the system.
      
      **Parameters**
      
      
         **operatorId**\ : :js:data:`OperatorId <wv.OperatorId>`
      
      
            the ID of the operator that is to be unregistered
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.unsetCallbacks

      .. rst-class:: sig-pretty-signature
      
         | unsetCallbacks(**callbacks**\ : :js:class:`CallbackMap <wv.CallbackMap>`\ ): *void*
      
      Unregisters callbacks from the system. Note the actual function object passed in must be the same as the one that was registered using setCallbacks.
      
      **Parameters**
      
      
         **callbacks**\ : :js:class:`CallbackMap <wv.CallbackMap>`
      
      
            object with property names set to corresponding functions to be unregistered.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.WebViewer.waitForIdle

      .. rst-class:: sig-pretty-signature
      
         | waitForIdle(**config**\ : { redraw: *boolean* }?): *Promise*
      
      Returns a Promise that will resolve after streaming and associated asynchronous operations complete and the scene is fully drawn.
      
      **Parameters**
      
      
         **config**\ : { redraw: *boolean* } = {}
      
      
      **Returns**\ : *Promise*
      




