Display Model Element Type in Generic Table

Diagramming issues

Moderator: Moderators

Display Model Element Type in Generic Table

Postby ryan.hill@gtri.gatech.edu » Thu Sep 24, 2020 10:58 am

Hello,

I am trying to create a simple generic table that shows the model elements present in a package. I would like the table to show the model element type (Activity, Paramter, ActivityFinalNode, etc.). The icon for the type shows up next to the element name, but I would like a separate column that shows the element type. I have tried a simple OCL script
Code: Select all
self.oclType()
but that does not work (evaluation mode returns "Can not evaluate OCL").

Is it possible to show the model element type in a generic table in CSM?

Thanks!

--Ryan
User avatar
ryan.hill@gtri.gatech.edu
Forum Newbie
Forum Newbie
 
Posts: 10
Posts Rating:0
Joined: Wed Jun 24, 2020 11:25 am
Full name: Ryan Hill

Re: Display Model Element Type in Generic Table

Postby ogirdor » Thu Oct 01, 2020 2:12 am

Hello Ryan,

you could solve this by creating a custom column with a script in e.g. Groovy: arg1.getHumanType().

2020-10-01 10_09_04-TypeInGenericTable.png
You do not have the required permissions to view the files attached to this post.
ogirdor
Forum Beginner
Forum Beginner
 
Posts: 45
Posts Rating:13
Joined: Wed Jun 03, 2020 4:41 am

Re: Display Model Element Type in Generic Table

Postby ryan.hill@gtri.gatech.edu » Thu Oct 01, 2020 8:36 am

Brilliant! Thank you for that. That is super helpful!
User avatar
ryan.hill@gtri.gatech.edu
Forum Newbie
Forum Newbie
 
Posts: 10
Posts Rating:0
Joined: Wed Jun 24, 2020 11:25 am
Full name: Ryan Hill

Re: Display Model Element Type in Generic Table

Postby ber.estnevao27@gmail.com » Sun May 02, 2021 9:57 pm

Thanks for the update and quick reply. I'll be sure to keep an eye on this thread. Bumped into your thread. Thanks for creating it. Looking forward for solution.
ber.estnevao27@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Sun May 02, 2021 9:56 pm


Return to Diagramming

Who is online

Users browsing this forum: No registered users and 0 guests