cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Creating a Custom Stereotype

cfreund
1-Visitor

Creating a Custom Stereotype

How do I create a custom Stereotype so that I can assign it to some blocks?

ACCEPTED SOLUTION

Accepted Solutions

Hi Chris,

To create a new stereotype:

  • Create a new package. Click the package, then Options tab and select the "Profile Package" checkbox.
  • Right-click on the package and select New > UML > Profiles > Stereotype
  • Stereotype1 will be created. Select the stereotype and click the Items tab. Select Model Item types , and click the Link icon .
  • In the Link Editor , choose the types that this stereotype can be applied to. For blocks, check the Class box and click OK.

 

You can now select a block in a browser or diagram, right click and choose Applied Stereotypes. The new Stereotype1 will be available for selection.

(Alternatively you can select a block, click on the Items tab and select Stereotypes to link/unlink stereotypes)

If you want the stereotypes to be displayed on a symbol on a diagram, right click the item and select Show/Hide Compartments. Select the Role called Assigned Stereotypes.

Regards,

Patrick

View solution in original post

3 REPLIES 3

Hi Chris,

To create a new stereotype:

  • Create a new package. Click the package, then Options tab and select the "Profile Package" checkbox.
  • Right-click on the package and select New > UML > Profiles > Stereotype
  • Stereotype1 will be created. Select the stereotype and click the Items tab. Select Model Item types , and click the Link icon .
  • In the Link Editor , choose the types that this stereotype can be applied to. For blocks, check the Class box and click OK.

 

You can now select a block in a browser or diagram, right click and choose Applied Stereotypes. The new Stereotype1 will be available for selection.

(Alternatively you can select a block, click on the Items tab and select Stereotypes to link/unlink stereotypes)

If you want the stereotypes to be displayed on a symbol on a diagram, right click the item and select Show/Hide Compartments. Select the Role called Assigned Stereotypes.

Regards,

Patrick

Thanks Patrick,

I actually got in touch with Matthew Hause yesterday, and he was able to walk me through this.

Question though, as I was going through the Help Topics, the guide insisted that I needed to create and associate a tag definition with each new stereotype before I would be able to use it, but your solution seems to suggest that it is not necessary.  Do you know anything about this>

hi Chris,

Stereotypes can be used to create new types (refer to Help topic "Overview of extending model item properties through stereotypes and tag definitions") but you also need the tag definition which is used to define additional properties for that type. Stereotypes on their own can be applied to items (as I describe above), but without tag definitions they act more as a classification/taxonomy. Also refer to Help topic "Overview of lightweight extensions of PTC profiles".

Hope this helps.

Regards,

Patrick

Announcements


Top Tags