UI.DWGViewer() class

Create a viewer that displays a .dwg asset file and a number of useful tools for viewing DWG files.

Signature:

export default class DWGViewer(locale: string, containerId: string, assetId: string, onReady: (viewer: DWGViewer)=>void , onError: (err: string)=>void);

Parameters

ParameterTypeDescription
localestringThe language of the UI, either "zh" or "en".
containerIdstringThe id of a DIV DOM which will host the viewer.
assetIdstringThe asset id of the DWG file which is obtained either in asset management website or returned in upload function.
onReady(viewer: DWGViewer)=>voidCallback when the viewer is created.
onError(err: string)=>voidCallback when some errors happen.

Returns:

Modelo.UI.DWGViewer

Methods

MethodModifiersDescription
destroy()---Destroy the viewer.