Query for Legend in IBD based on Stereotype

General discussions about MagicDraw

Moderator: Moderators

Query for Legend in IBD based on Stereotype

Postby twinpeaksJD » Wed Jul 25, 2018 7:24 am

I am trying to create an IBD that has color coding using a legend based on stereotype of the type of a part property.

I was able to create a metachain to find the stereotype, but I have not figured out how to get the to return a true/false for the legend.

The issue is I get a list of all stereotypes, I want to return true if one of them is a match, I tried property test and type test, but get an error because there is a list. Is there some other way to implement this?

Thanks!
twinpeaksJD
Forum Newbie
Forum Newbie
 
Posts: 20
Posts Rating:0
Joined: Wed Jan 03, 2018 10:24 am

Re: Query for Legend in IBD based on Stereotype

Postby osvaldas.jankauskas@nomagic.com » Mon Jul 30, 2018 11:50 pm

Hello,

Thank you for your question.

I've attached the sample project wherein you can find your desired result.

Cooler System.mdzip


The Property Test operation was used to check the applied stereotype of an element. Find more details at https://docs.nomagic.com/display/MD190/ ... +operation

We recommend you to take a look at the short demo video about dynamic legends:

https://www.youtube.com/watch?v=ShM8jQL8mes

If you have any other questions or concerns - feel free to contact us.

Best regards,
No Magic, Inc. Customer Support
You do not have the required permissions to view the files attached to this post.
osvaldas.jankauskas@nomagic.com
Customer Support
Customer Support
 
Posts: 127
Posts Rating:14
Joined: Mon Apr 20, 2015 10:01 am

Re: Query for Legend in IBD based on Stereotype

Postby twinpeaksJD » Wed Aug 01, 2018 10:16 am

Thanks for the demo, unfortunately that did not work for my project, I think that is because I am using System, External System and SubSystem Stereotypes. Is there a way to make this work with these special stereotypes?

Thanks!
twinpeaksJD
Forum Newbie
Forum Newbie
 
Posts: 20
Posts Rating:0
Joined: Wed Jan 03, 2018 10:24 am

Re: Query for Legend in IBD based on Stereotype

Postby osvaldas.jankauskas@nomagic.com » Thu Aug 02, 2018 1:38 am

Hello,

If you need to adorn the part property for which type "System" stereotype is applied, do the following:

1. Copy the legend from the attached project to your project.
2. Jump to the specification of systemPart legend item and specify Elements by Condition property value.
3. Set the Applied Stereotype value to "System".

As a result, the part properties for which type element "System" stereotype is applied are adorned.

If you have any other questions or concerns - feel free to contact us.

Best regards,
No Magic, Inc. Customer Support
osvaldas.jankauskas@nomagic.com
Customer Support
Customer Support
 
Posts: 127
Posts Rating:14
Joined: Mon Apr 20, 2015 10:01 am

Re: Query for Legend in IBD based on Stereotype

Postby twinpeaksJD » Thu Aug 02, 2018 6:36 am

That is what I expected would work, but I get no adornment with that, either on your example or my project. Works fine with other stereotypes though.

Thanks!
twinpeaksJD
Forum Newbie
Forum Newbie
 
Posts: 20
Posts Rating:0
Joined: Wed Jan 03, 2018 10:24 am


Return to MagicDraw

Who is online

Users browsing this forum: No registered users and 1 guest