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.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.