Modeling How-To's > Working with Variables and Attributes > Assigning Values to Variables and Attributes

Assigning Values to Variables and Attributes

With a variable or attribute defined along with its initial value, at some point in the model you want to assign it a new value or increment/decrement its current value.

 

The model used for this example, as well as all of the modeling "how-to" examples, can be found in the ProModel Solutions Café (http://www.promodel.com/solutionscafe/howto/).

Solution

  1. Click on the Logic button that appears in the Properties dialog of most shapes. This opens the Logic Builder.
  2. To assign a new value to the variable or attribute, double-click on the Assign statement and enter the new value.
  3. To increment/decrement the value of a variable or attribute, double-click on the Inc or Dec statement and enter the value by which the variable or attribute should be incremented/decremented. (If you leave the value blank, a value of 1 is assumed.)
Example

You would like to increment a variable called vExitCount by 1 every time an entity leaves an activity.

 


© 2011 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com