Step 7 - Set Up Mutual Inclusion Relationships Between Modifiers

The %ADDVALIDSTATE directive gives the user modifiers the ability to control the availability of other modifiers, based on the current state of the user modifier.

In the case of a hole operation, different finishing strategies are offered (such as Tap and Bore) with a user modifier being used for ‘Strategy’. In the case where Bore is selected as a strategy, the Pitch modifier for Tap should be greyed out, and is only enabled if the strategy is changed to Tap.

Two flavours of the directive are required: one to set the valid states for command modifiers, and one for a user modifier.

 

%ADDVALIDSTATE=[OperationID],UserVariable,Value,
[CommandId],[ModifierId],[State]

%ADDVALIDSTATE=[OperationID],UserVariable,Value,
UserVariable,[State]

 
For example:

 

%ADDVALIDSTATE=[HoleOp],_listStrategy,1,[DrillCmd],
[PitchMod],1

 
This would set up a relationship between the strategy user modifier and the Pitch command modifier, such that the Pitch is only valid if Strategy has a value of 1.

 

%ADDVALIDSTATE=[HoleOp],_listStrategy,0,_realDepth,0

 
This would set up a relationship between the Strategy user modifier and the Depth user modifier, such that the Depth is invalid if Strategy has a value of 0.