Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Display Element/Connector Properties

The commands print, println, and printwrapped all take a string parameter representing the text to be printed. Element and connector properties can be added to the text using the substitution macro #propertyname#; for example:

       println("name: #NAME#");

In addition to the properties listed here, Tagged Values can be displayed by prefixing the Tagged Value name with TAG:

       print("#TAG:condition#");

You can also test against and display an element's custom properties in the same way as you do the named properties

      if(hasproperty("Name","Value"))
         ...

and:

       print("#Name#");

There are further examples of Shape Scripts and commands in the Example Scripts topic.

Properties for Element Shape Scripts

•addin (value returned from an Add-In)
•alias
•author
•cardinality
•classifier
•classifier.alias
•classifier.metatype
•classifier.name
•classifier.stereotype
•classifier.type
•complexity
•concurrency
•datecreated
•datemodified
•diagram.handdrawn
•diagram.mdgtype
•diagram.name
•diagram.stereotype
•diagram.type
•haslinkeddocument
•incomingedge (returns "none", "left", "right", "top", "bottom", or "multiple")
•isabstract
•isactive
•iscomposite
•isembedded
•isinparent
•isleaf
•islocked
•isroot
•isspec
•istagged
•keywords
•language
•metatype
•multiplicity
•name
•notes
•outgoingedge (returns "none", "left", "right", "top", "bottom", or "multiple")
•packagename
•parentedge ("right", "left", "top", "bottom")
•parent.metatype
•partition (returns "vertical" or "horizontal")
•persistence
•phase
•propertytype
•propertytype.alias
•propertytype.metatype
•propertytype.name
•propertytype.stereotype
•rectanglenotation
•scope
•status
•stereotype
•subtype
•type
•version
•visibility
 

Properties for Connector Shape Scripts

•addin (value returned from an Add-In)
•alias
•diagram.connectornotation
•diagram.handdrawn
•diagram.mdgtype
•diagram.name
•diagram.stereotype
•diagram.type
•direction
•effect
•guard
•isroot
•isleaf
•name
•rotationdirection ("up", "down", "left", "right")
•source.aggregation
•source.alias
•source.changeable
•source.constraints
•source.element.name
•source.element.stereotype
•source.metatype
•source.multiplicity
•source.multiplicityisordered
•source.name
•source.qualifiers
•source.stereotype
•source.targetscope
•stereotype
•target.aggregation
•target.alias
•target.changeable
•target.constraints
•target.element.name
•target.element.stereotype
•target.metatype
•target.multiplicity
•target.multiplicityisordered
•target.name
•target.qualifiers
•target.stereotype
•target.targetscope
•type
•weight
 

Learn more