Customization > Extensibility Through Profiles, Stereotypes, Tag Definitions and Scripts > Extensibility through stereotype scripts and script items > Extending linking capabilities through stereotypes and tag definitions > Creating a tag definition to extend linking capabilities
  
Creating a tag definition to extend linking capabilities
This topic documents creating a Tag Definition through the Packages pane. For information about using a Profile Diagram to create a Tag Definition, see Creating a tag definition on a profile diagram.
To create a tag definition to extend linking capabilities:
1. If you have not created a profile Package, create a profile Package. For more information, see Creating a profile Package.
2. Right-click the profile Package in which you want to create the Tag Definition, point to New, point to UML, point to Profiles, and then click Tag Definition.
3. Name the Tag Definition as required.
We recommend that you prefix the name with a prefix that is common to all Tag Definitions used in the Profile.
* 
The name has to be unique within the Model; spaces and underscores are ignored when checking the uniqueness of a Tag Definition Name.
You may experience problems if you apply a Tag Definition to an item and the Tag Definition's name matches an automation interface property name of that item.
If you want the display name of the Tag Definition in Modeler to be different from its real name, on the General tab of the Tag Definition's property pages, type a display name in the Name Alias box.
4. Open the Tag Definition's Property Pages, and then click the Type tab.
5. Click the Reference option.
6. Click the Link button.
7. To select valid model item types: In the Types list, select Model Item Types, select the check boxes associated with the valid target model item types, and then click OK.
To select valid Stereotypes: In the Types list, select Stereotypes, select the check boxes associated with the valid Stereotypes, and then click OK.
* 
An item to which the Tag Definition has been applied can link only to items of a valid target type or items that are stereotyped by a valid Stereotype through the Tag Definition.
8. Click the Usage tab, and then set the check boxes as required. For more information about the options, see Overview of extending model item properties through stereotypes and tag definitions.
9. If you want the Tag Definition to appear in the Items tab of a referenced item's Property Pages, type an Inverse Name. The Tag Definition will be listed using the Inverse Name you specify.
10. On the Usage tab, click Publish, and then from the confirmation dialog click Yes.
* 
If you create a Tag Definition by right-clicking a Stereotype, pointing to New and then clicking Tag Definition, the Tag Definition will be linked to the Stereotype.
* 
A Tag Definition cannot be used until it is published. After publishing a Tag Definition, its Data Type cannot be changed.
You typically require database write access permissions to publish a Tag Definition. If a Tag Definition is not linked to any Stereotypes that have model item types defined, you can publish that Tag Definition without database write access permissions; however, having published the Tag Definition, you require database write access permissions to make the Tag Definition useable, that is:
Link the Tag Definition to a Stereotype that has model item types defined.
Define model item types for any linked Stereotypes.
If you link diagrams to an item through a reference Tag Definition, you can open those referenced diagrams through the item's Open > Associated Diagrams context menu commands.