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

Define Creation of Instance

A stereotyped element can be the classifier of instances created from it. You can define how an instance is created from that stereotyped element, by adding special attributes to the defining Stereotype. The attributes modify the text on the Paste Element dialog that displays when a stereotyped element is dragged out of the Project Browser onto a diagram.

Attributes Set

Attribute

Meaning

See also

_instanceMode

Modifies the second Paste Element into Diagram option on the Paste Element dialog to either:

as Instance of Element or
as Property of Element

 

The text is determined by the value (Instance or Property) of the attribute's Initial Value field.

If the attribute is not applied, the option defaults to Instance.

 

 

_instanceOwner

Modifies the second Paste Element into Diagram option on the Paste Element dialog to:

as Instance of <element type>

 

The text is determined by the value of the attribute's Initial Value field, such as Block.

If the attribute is not applied, the option defaults to Element.

 

 

_instanceType

Modifies the second Paste Element into Diagram option on the Paste Element dialog to:

as Instance of Element (ProfileName::<<stereotype>>)

 

The <<stereotype>> value is defined in the Initial Value field of the attribute, and corresponds to the metatype given to the stereotyped element using the _metatype attribute.

 

Define a Stereotype as a Metatype

 

The following example from SysML shows the definition of any instances of a SysML Block element that might be created.

BlockStereo

 

When a user drags a SysML Block element from the Project Browser onto a diagram, the system checks the _instanceType attribute value and searches the SysML Profile for an element template with a matching _metatype attribute value, and generates the instance from that - with the above definition you would get a Part element with the �property� stereotype.

Learn more