cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OppositeLegID not working in script

pvandeginste
Honored Contributor

Hi,

 

I'm working on a MetaCommand that would allow users to trigger a script that automatically hides any associations on the diagram that are not related to the described object (ex.: in an application's diagram, the link between another application and a software technology also connected to the described application). 

 

In my VB script macro, when I use "OppositeLegName" and indicate the name of the MetaAssociationEnd (ex.: link.OppositeLegName = "Used-Service"), the script works, and it hides the associations in the diagram. If I use "OppositeLegId" and the Absolute Identifier of the MetaAssociationEnd (ex.: link.OppositeLegId = "HsUir9B5iee0"), the script doesn't work, and the associations aren't hidden.

 

Can someone tell me why it wouldn't work with "OppositeLegId" and the Absolute Identifier of the MetaAssociationEnd?

 

Thanks!

1 Reply

lionel
MEGA
MEGA

Hello,

 

In case you still  have this question, there are different kinds of "Identifiers" in MEGA (_IdAbs, _HexaIdAbs, the one you get with the "getId" command...).

To make your script work, try the following :

Root.getObjectFromId(link.OppositeLegId).getProp("_idabs") = "HsUir9B5iee0"

 

Lionel