Question & Answer
Question
How do you add a Value Property in a SysML project with the API using IBM Rational Rhapsody?
Cause
You have been unable to find an API method that adds a Value Property directly.
Answer
The "ValueProperty" is a SysML element, but is not a a core metaclass of the Rhapsody tool. They are SysML new term stereotypes of UML "Attributes". Therefore, you must first create an attribute, then apply the "ValueProperty" stereotype to the attribute. Note that if you specify the wrong name stereotype or the SysML profile is not loaded in your project, a new stereotype will be created in its absence (producing unexpected results). Here is an example of the API code required to create a Value Property element in Rhapsody. A downloadable example can be found at the bottom of this article.
![](/support/pages/system/files/support/swg/rattech.nsf/0/40e7759cd0e70efb85258144004d147a/Content/0.350.jpg)
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg22004934