☰

Methods

AutoScene Draw Web SDK Methods

These methods are provided to control the actions and behavior of the AutoScene Draw Web editor.

Method Description
addMenu Adds a custom menu to the toolbar of the editor (if the toolbar is enabled).
addShapesFromJSON Adds shapes to the diagram based on the provided JSON data.
clipboardContentChanged This method should be called anytime the clipboard content has been changed by actions outside AutoScene Draw Web .
defineTemplateAction This method enables you to define a custom action that can be applied to diagram templates displayed in the template selection window of AutoScene Draw Web .
destroy Destroys the currently instantiated AutoScene Draw Web instance and releases all of its resources.
eraseDiagram Reinitializes AutoScene Draw Web with a blank diagram.
executeCommand Executes a AutoScene Draw Web command.
executeCommandEx Executes a AutoScene Draw Web 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 AutoScene Draw Web 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 AutoScene Draw Web editor.
initializeCommandEnabledState This method triggers a commandEnabled event for every supported command.
isDiagramDirty Returns true if the AutoScene Draw Web editor contains a diagram that has been modified.
isDiagramEmpty Returns true if the AutoScene Draw Web editor contains an empty diagram.
load Loads an existing drawing into the AutoScene Draw Web editor.
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 AutoScene Draw Web events.
set Sets an AutoScene Draw Web property value.
setDiagramMetadata Sets metadata for the diagram currently loaded in the AutoScene Draw Web editor.
show Shows the AutoScene Draw Web after it has been hidden by a call to the hide method.
startup Starts and shows the AutoScene Draw Web editor. 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.