Variables & Constants

This page provides example code for working with Variables & Constants in the Integration Theme.

For Variables & Constants to be accessed via the API, they must be listed in the <permissions> block of DriveWorksConfigUser.xml

For full configuration guidance, see Integration Theme Settings in DriveWorks Pro Help.

💡 Tip: To see how this example is written, view the source code of this page.

The shared config.js file for these examples is incomplete. Enter your own settings for the examples to function.

Get all Variables

This example displays all of the Variables for a Specification with their values in a table.

Variables

Name Value
Loading...

Get all Constants

This example displays all of the Constants for a Specification with their values in a table.

Constants

Name Value
Loading...

Update a Constant

This example shows how Constant values can be updated via the API.

It uses the first Constant of the configured Project (if Constants are available and listed above).

Note: To allow a Constant to be updated using the Integration Theme, it must be granted edit permissions.

This is configured in the <permissions> block of DriveWorksConfigUser.xml, per Team.

Example Usage: <team name="YourTeamName" canEdit="true" />.

See Integration Theme Settings in DriveWorks Pro Help for more details.