How to create different mass for different iParts?

How to create different mass for different iParts?

taduykhang
Enthusiast Enthusiast
483 Views
3 Replies
Message 1 of 4

How to create different mass for different iParts?

taduykhang
Enthusiast
Enthusiast

Hello everyone, 

 

I have a part that have different configurations. So I created iParts for it, which will be updated as another configuration as I enter the values for its parameters. As you can see in the attached picture, when I create a new iPart, let's say here RKDEW 100, I will enter those set parameters and the model will change accordingly.

Okay, the end of the brief explanation. The problem I want to ask is, how can I assign custom Mass to the iPart just like the other parameters? It's the mass value that appears in the Physical tab of the iProperties.

To be clear, I want to add a new column to the iPart table, name it Mass (or Weight), and then manually assign the desired value to it, then each iPart will have its own assigned mass value when the model is shifted to it. This is for calculating the mass of different assemblies in which different type of the part is used.

 

Thank you so much.

taduykhang_0-1755573280533.png

 

0 Likes
Accepted solutions (1)
484 Views
3 Replies
Replies (3)
Message 2 of 4

SharkDesign
Mentor
Mentor

The only way I know to do this is to have a column for mass and then use an iLogic code with:

mass = iProperties.Mass

 

 

  Inventor Certified Professional
0 Likes
Message 3 of 4

taduykhang
Enthusiast
Enthusiast

Hi SharkDesign, 

 

Thank you for your reply. But can you please elaborate? I still don't know how to carry that out.

0 Likes
Message 4 of 4

taduykhang
Enthusiast
Enthusiast
Accepted solution

Hi everyone, somehow I found out the solution for this. I'll share the procedure to do so here in case anybody needs it. 

 

1. Create a new custom iProperties: 

  • Open iProperties of the part.
  • Go to Custom tab, type in the name for the custom iProperties (here I use the name "Weight") and select type Number.
  • Press Add to create the new iProperties.

2. Specify the iProperties of different configurations in iParts:

  • Go to tab Manage, select Create iParts in the Author section.
  • iPart Table shows up, go to tab Properties, under Custom section, bring the custom iProperties into the iPart Table.
  • Specify the value for each custom iProperties for each configuration.

3. Create iLogic Rule:

  • Go to tab Manage, select Add Rule in the iLogic section.
  • Name the new rule.
  • In the new Edit Rule window, enter the code 
    iProperties.Mass=iProperties.Value("Custom","Weight")
    (This is for the iProperties named "Weight" I created above. Change the string in the last pair of quotation mark at the end to whatever your iProperties name is)
  •  Save & Run the code.

4. Decide the event trigger

  • Go to tab Manage, select Event Triggers in the iLogic section.
  • Drag the rule under any event you want to trigger the rule.
    (For my case, I want it to change the weight accordingly whenever I switch to another configuration, so I drag it under Part Geometry Change)
  • Select OK and it's done