Methods
Web SDK Methods
These methods are provided to control the actions and behavior of the Web SDK editor.
| Property | Description |
|---|---|
| addMenu | Adds a custom menu to the toolbar of the editor (if the toolbar is enabled). |
| clipboardContentChanged | This method should be called anytime the clipboard content has been changed by actions outside the Web SDK. |
| defineTemplateAction | This method enables you to define a custom action that can be applied to diagram templates displayed in the template selection window of the Web SDK. |
| destroy | Destroys the currently instantiated Web SDK instance and releases all of its resources. |
| eraseDiagram | Reinitializes the Web SDK with a blank diagram. |
| executeCommand | Executes a Web SDK command. |
| executeCommandEx | Executes a Web SDK command with onSuccess and onError handlers. |
| exportImage | Exports the current drawing as an image. The resulting image is passed into the onSuccess function as a Base64 encoded string. |
| get | Gets a Web SDK property value. |
| getAttachmentPositionsInExpImage | Returns the positions of attachment symbols in the current diagram within the bounds of an exported image. |
| getDiagramMetadata | Gets diagram metadata previously set using setDiagramMetadata. |
| hide | Hides the Web SDK. |
| initializeCommandEnabledState | This method triggers a commandEnabled event for every supported command. |
| isDiagramDirty | Returns true if the Web SDK contains a diagram that has been modified. |
| isDiagramEmpty | Returns true if the Web SDK contains an empty diagram. |
| load | Loads an existing drawing into the Web SDK. |
| lookupVINS | Decodes “VIN” fields in vehicle data to extract the fields “Type”, “Year”, “Make”, “Model”, and “TypeId”. The extracted vehicle information can be used to update the vehicle data. |
| on | This method can be called to install event handlers for various Web SDK events. |
| set | Sets a Web SDK property value. |
| setDiagramMetadata | Sets metadata for the diagram currently loaded in the Web SDK. |
| show | Shows the Web SDK after it has been hidden by a call to the hide method. |
| startup | Starts and shows the Web SDK. The startup method requires a single parameter: an object containing the properties to be set. |
| store | Creates SVG data for the current diagram and passes this SVG data into the onSuccess function. Optionally, the method will return a Base64 encoded export of the diagram in png or jpeg format. |
Web SDK Developer’s Guide