Get Legend Item Values of a Diagram Element

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Get Legend Item Values of a Diagram Element

Postby larrys@mitre.org » Thu May 16, 2019 2:13 pm

I currently have a diagram which contains a bunch of parts, ports, and connections. I have a custom legend that I bring into the diagram, and I apply each Part with a particular legend item so that it changes its color to that Legend item (by right clicking->Legend Item->check the right item).
My question is, how to I get that Legend Item value from a selected Part element? For example, if I had a Legend with a list of colors mapped to vehicle types (e.g. Sedan, Truck, Van, etc.), and I have a Part in a diagram that had the "Truck" Legend Item applied to it, how do I grab that "Truck" value from the Part using the MD OpenAPI? I assumed there was some list of properties to look at when you grabbed the Part as a PresentationElement, but I haven't found where the Legend Item information is stored. Any help will be greatly appreciated. Thanks!
larrys@mitre.org
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Wed Aug 23, 2017 1:39 pm

Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 1 guest