Home Search

DriveWorks Pro 22
Set Instance State

Send Feedback

Set Instance State

The Set Instance State Generation Task will set the state of an instance.

An instance can be hidden or shown, suppressed or unsuppressed, deleted or switched to another configuration.

This Generation Task can only be applied to Components within the top level Assembly.

Properties

Property NameDescription
(Name)The unique name for this task.
Instance NameThe name of the component in the assembly, including its instance number.
StateThe state to set the instance to.

(Hide or Show, Suppress or Unsuppress, Delete, Configuration Name)

Example

Instance Name Syntax

Instances are suffixed immediately after the component name (no space), with a dash and then the instance number.

For example:

For a component that appears in the SOLIDWORKS Feature Manager (after DriveWorks Model Generation) as - Part1 MyProject 0004<1>

Would be referenced as:

Part1 MyProject 0004-1

Instance Order

This task is easier to implement if instances are listed in numeric order in the SOLIDWORKS Feature Manager.

For example:

Instance <1> - is the first instance.

Instance <2> - is the second instance.

Instance <3> - is the third instance.

Unordered instances are renumbered, by SOLIDWORKS, when the assembly is driven.

If instances do not follow an order we recommend generating a new clone and noting the new instance numbers to be driven.

Property NameExample RuleExample ResultMeaning
Instance Name"Bracket " & DWSpecification & "-2"Bracket Canopy Assembly 0006 -2Will set the state of the second (-2) instance in the assembly.
StateIf(DWVariableBracket2=TRUE, "Unsuppress", "Suppress")SuppressWill suppress the instance.
StateColorReturnRedWill swap the configuration to Red.
The configuration must exist in the component.
State"Delete"DeleteWill delete the instance.
When deleting instances the task must be placed in the Post Drive Tasks sequence.

Generation Sequence

This Task can be added to the following Generation Sequence(s):

  • Pre Drive (will be run before the Main Drive Sequence)
  • Post Drive (will be run after the Main Drive Sequence)