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

MetaAttribute for checking Component to Product Link using Macro

Senior Member


I am new to Mega and Macro.

We are trying to create a MetaAttribute [Product_Link] in "Application" MetaClass [Component].

The new MetaAttribute will have either "True" or "False" values for each of the components in the "Application" MetaClass.

As this new MetaAttribute is to check the link between Component and Product, from one MetaClass to another, we have planned to write an Macro.


Below is the Macro we are using:

Sub GetAttributeValue(Object as MegaObject,AttributeID as Variant,Value as String)
Dim Prod
Set oRoot = object.GetRoot
Set Prod = oRoot.getSelection("Select [Application System] Where [Owned Component Application].[Application Used]:Application &Name").Item(1)
If Prod.getID <> 0 then
Value = "True"
Value = "False"
End IF
End Sub


Can someone help me with the above macro?

0 Replies