Creating an item type through a lightweight extension
To create an item type through a lightweight extension:
2. If you have not done so already, unprotect the PTC Profile package that contains the profile item type you want to extend.
To unprotect a PTC Profile package, open the PTC Profile package's Property Pages, click the
Access Permissions tab, clear the
Protected check box, and then click the
Copy Protected Flag to Child Packages button.
3. If you have not done so already, create a Profile Diagram in your profile Package.
To create a Profile Diagram, right-click the Package, and select > > > .
4. On the Profile Diagram, add the Stereotype associated with the item type you want to extend to the profile diagram:
a. On the diagram tab, click the
Stereotype button, and then right-click in free space.
b. Select the Stereotype associated with the item type you want to extend, and then click OK.
5. On the Profile Diagram tab, click the
Stereotype button, and the click in free space on the diagram.
6. Type the name of the new item type you want to create, and then press the Enter key.
7. On the diagram tab, click the
Generalization button.
8. Click the new Stereotype you created, and then click the Stereotype you are extending.
9. Right-click the Stereotype you have created, and select > > . This sets up the check boxes on the Options and Directly-Stereotyped Options tabs of the Stereotype's Property Pages.
10. If you require new properties for your new item type, create the required Tag Definitions for the Stereotype.
11. To specify an icon to use for your new item type in the Modeler browsers and on diagram buttons, and to change the presentation of your new item type on diagrams:
a. Open the Stereotype's Property Pages.
b. Click the Style tab, click the Edit button, and on the Style Modification dialog define the icon to use and the link's presentation.
12. In the Packages pane, right-click the Model, and then click Reinitialize Profile Helper.
13. If Profile Helper caching is enabled, update the Lightweight Profile Version number to a later version number:
a. In the Packages pane, right-click the Model, and select > > .
b. Select the check box that is associated with the profile Package that you have changed.
c. Click the command for the version number part you want to increment. Major is the first number, Minor is the second number, Build is the third number, and Revision is the final number.
d. Click OK.
14. Right-click your profile Package, and select > > .
This creates the scripts for the commands and tab buttons that are required for your new item type in the context of your profile Package.
15. Create the scripts for the commands and buttons that are required to support your new item type in the other supported profile Packages in the model. For example, if you have extended the Block item, you will need to create scripts for the SysML profile so that your new item type can be created on a Block Definition Diagram.
For each profile Package that requires changing to support your new item type: right-click the profile Package, and select > > .
Tip: If you have created Scripts in a PTC Profile and you do not want the Create Scripts command to delete those Scripts, start the names of those Scripts with [DND].
| Creating scripts for the SysML profile does not create scripts for the SysML Requirements profile. After creating scripts for the SysML profile, expand the SysML profile, and then create scripts for the Requirements profile it contains. |