Hi,
95% of all products my company produces will be places on the bottom of the ocean.
To easily find out the weight under water for each item, I wrote an irule in the standard .ipt template file which creates a custom iproperty "submerged weight".
My question is as follows:
Isit possible to create an irule in the standard .iam template to create a custom iproperty which adds up all custom properties "submerged weight" of all underlying parts?
I realize I can put the "submerged weight" property in the parts list, but that's not what I want. Because in an assemby the total submerged weight is interesting, but not of each item.
Any help would be appreciated.
Kind regards, Lars
Thanks for the reply!
That sounds like a step in the right direction, but I don't know how to read or collect the expressions from the ipt's and sub-iam's in the main iam.
I could make a "custom ipoperty" named submerged weight in the main iam. Then this "custom property" somehow needs to collect the "custom property" submerged weight from the ipt's and sub-iam's and add them up.
Should I make a macro? Should I use an irule? I'm stuck....
Hi,
It's up to you whether you go with iLogic, VBA or an AddIn.
One thing that I was wondering about though is if your assemblies can contain cut featues that remove bits from parts.
If so, then aggregating data from the parts might not be enough. In such a case, it might be better to iterate through all the leaf occurrences of the main assembly and check their definitions for density and calculate things like that.
Otherwise just going through all the parts recursively and collecting the iProperty data could be enough.
Some info on recursively iterating assembly components, "TraverseAssembly" function: http://modthemachine.typepad.com/my_weblog/2009/03/accessing-assembly-components.html
Cheers,