Skip to main content

onDrawingNewRevision

Last updated 22/07/2026

Definition

is a host callback invoked by
DimensionIQWidget
when a user creates a new drawing revision in the widget.

As part of this process, DimensionIQ provides the host application with the new

record, the new drawing
DIQ_Storage
, the updated
DIQ_Layout
records from the previous revision, and the new

DIQ_Layout
records created for the new revision.

The host application is responsible for persisting these changes by:

  • Adding the new drawing storage provided in
    storage
  • Adding the new
    DIQ_DrawingRevision
    record to persistent storage
  • Updating the existing layout records using the updated
    DIQ_Layout
    objects provided in
    previousLayouts
  • Adding the new
    DIQ_Layout
    records provided in
    newLayouts
    to persistent storage

DimensionIQ will have already updated the revision relationships, including linking the new drawing revision to the previous drawing revision and linking the new layouts to their previous layout records. The host application should persist the records exactly as provided.

The host application must not delete the previous drawing storage as part of this callback.

Once processing is complete, please refer to the

onResponse
contract in the Widget Callback Introduction.

This callback ensures the widget and the host application remain synchronized when a new drawing revision is created.

Function Signature

TypeScript
Function Signature
onDrawingNewRevision: (
drawing: DIQ_DrawingRevision,
storage: DIQ_Storage,
previousLayouts: Array<DIQ_Layout>,
newLayouts: Array<DIQ_Layout>,
onResponse: (result: DIQ_Result) => void
) => void;

Callback Parameters

drawing
Type: DIQ_DrawingRevision
Description: The

object associated with the update.

storage
Type: DIQ_Storage
Description: The

object containing the new drawing file associated with the new revision.

previousLayouts
Type: Array<DIQ_Layout>
Description: An array of

objects that existed before the revision change.

newLayouts
Type: Array<DIQ_Layout>
Description: An array of

objects after the new revision has been applied.

onResponse
Type: (result: DIQ_Result) => void
Description: Callback function that must be called by the host to complete the operation.

Examples

onDrawingNewRevision