storeValue()

Synopsis

Stores a new "value" in a Dynamic rule on part under the name ruleName. Always returns True . If the ruleName already exists as a rule on part's Design , this effectively overrides it. If the ruleName already exists as a Dynamic rule on part , this will replace it.

Note: This function cannot be called from any rule which is dependent in ANY WAY on the rule which is being modified. This restriction is not currently enforced, and can easily lead to crashes or incorrect results. Use StoreValue at your own risk.

Syntax

storeValue ( newValue As Any, _
             part As Part, _
             ruleName As Name ) As Boolean 
Argument Type Description
newValue Any The value to store. Creates a rule that evaluates to the value, which is not necessarily the same as the expression used in the call.
part Part The part which will own the value.
ruleName Name The name under which the value will be stored.

Example 1

Dynamic rule as stored on part :
Rule myStoredValue As Number = 9 
Intent >storeValue(5+4, self(), :myStoredValue) 
--> True 
Intent >myStoredValue 
--> 9