Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

adding custom iproperty "submerged weight" in .iam

3 REPLIES 3
Reply
Message 1 of 4
Boyens
1222 Views, 3 Replies

adding custom iproperty "submerged weight" in .iam

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

3 REPLIES 3
Message 2 of 4
humbertogo
in reply to: Boyens

May the iProperty Expressions
Inventor allows you to create expressions for the values of iProperties.
Message 3 of 4
Boyens
in reply to: humbertogo

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....

Message 4 of 4
adam.nagy
in reply to: Boyens

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,



Adam Nagy
Autodesk Platform Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report