How do you change an attribute value during simulation when using multiple parts of a block in IBM Rational Rhapsody?
You would like to pass varying values through different instances of the block in the model.
You can assign values to an attribute of the part in either of the two ways below:
- Use the Initial Value field of the attributes.
In this case, the given value would appear on all the attributes of the instances (Parts).
- Use the Value field.
In this case, you can give different values for different instances,
Note: The content of the Value field does not get generated in the code. Hence, you would need to use the Initialization (call to parameterized constructor) to actually initialize the attributes with different values.