SysML Plugin 19.0 LTR Documentation

Contents


You need to import com.nomagic.magicdraw.sysml.util.SysMLProfile to use this API class.


Get a string constant for each property of stereotype (tag)

Usage includes “SysMLProfile.STEREOTYPE_PROPERTY_NAME”.

For example, SysMLProfile.ALLOCATED_ALLOCATEDFROM_PROPERTY returns a string of “allocatedFrom”.


Get a stereotype element

Usage includes:

“SysMLProfile.getInstance(project).getStereotype()” - where project refers to a project that uses SysML Profile.

“SysMLProfile.getInstance(element).getStereotype()” - where element refers to the element in a project that uses SysML Profile.

For example, SysMLProfile.getInstance(project).getBlock() returns the reference to the «Block» stereotype object.


Check if an element is stereotyped

Usage includes “SysMLProfile.isStereotype(Elem)” - where Elem is the element you would like to check.

For example, given an element “Elem”, SysMLProfile.isBlock(Elem) returns True if the element “Elem” has «Block» stereotype applied, and returns false otherwise.

 

  • No labels