DIQCapabilities
Overview
When a capability is enabled, the widget assumes the host application will initiate that action instead of the user performing it from within the widget. The widget automatically hides its built-in UI for that action, allowing the host application to provide its own workflow while still using the DimensionIQ API.
This provides a simple way to integrate DimensionIQ into applications that already have their own project management, drawing management, or revision management interfaces.
Properties
| Property | Description |
|---|---|
createRevision | Indicates that the host application will create revisions, the widget hides its Add Revision button |
addDrawing | Indicates that the host application will add drawings, the widget hides its Add Drawing button |
openProject | Indicates that the host application will open projects, the widget hides its Open Project button |
newProject | Indicates that the host application will create new projects, the widget hides its New Project button |
import type { DIQWidgetConfig } from 'dimensioniq';
const config: DIQWidgetConfig = {
capabilities: {
createRevision: true,
addDrawing: true,
openProject: true
}
};
In this example:
- The widget no longer displays Add Revision
- The widget no longer displays Add Drawing
- The widget no longer displays Open Project
The host application is responsible for invoking the appropriate
Implementation Guidelines
Host-Controlled Workflows
Capabilities only affect the widget's user interface.
They do not automatically perform any operations or create objects. Instead, they indicate that the host application is responsible for initiating those workflows using the appropriate API methods.
For example, when
- The widget hides its Add Revision button
- The host application provides its own "New Revision" command
Partial control
Capabilities may be enabled individually.
For example, an application may manage projects itself while still allowing users to create drawings and revisions from within the widget.
capabilities: {
openProject: true,
newProject: true
}
In this configuration only the project related UI is suppressed.
Runtime Updates
Because
bridge.sendCommand('applyConfig', {
capabilities: {
createRevision: true
}
});
The widget immediately updates its available UI to reflect the new capabilities.