cancel
Showing results for 
Search instead for 
Did you mean: 

How can Set Metaassociation attributes

Frequent Contributor

How can Set Metaassociation attributes

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
Highlighted
MEGA

Re: How can Set Metaassociation attributes

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