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

How can Set Metaassociation attributes

ColruytTeam
Honored Contributor

Hello All,
 I need to write a macro to change a attribute on Metaassociation for few Metaclass on a diagram . How can i get instance of metaassociation to set attribute. .

Thanks,
Sashi

Colruyt Team
1 Reply

cpucci
MEGA
MEGA

Hello,

 

the basic principle is to get the second object from the first object, and then you can update association attributes.

 

srcObj.getCollection("TheAssociationID").get(dstObj.megaUnnamedField()).setProp("yourAssociationAttributeId", "your value");

 

If you are using VB change .get to .Item and remove the parentheses around setProp, and the last semicolon, of course.

 

 

Claudio

Claudio Pucci