How to change iproperties mass with ilogic rule?

How to change iproperties mass with ilogic rule?

ikilic1461
Enthusiast Enthusiast
1,102 Views
4 Replies
Message 1 of 5

How to change iproperties mass with ilogic rule?

ikilic1461
Enthusiast
Enthusiast

Hi All;

I would like to change my assembly mass as below configuration without creating a new custom property.

That means just need to overrite iproperties mass.

I have 3 parts in my model. I need to add a compenent pattern as in the model and screenshoot , but I need to remove this pattern's weight from total weight. On BOM I only need 80 Qty, but as mass I need 1 item's mass. 

 

ikilic1461_0-1731409765689.png

 

For example this part's mass is 10,13 kg. Total assembly's mass becomes 820 kg. 

What I want on assembly BOM QTY : 80  ,  as a ipropertiesmass is  820 - (10,13* (80-1) ) = 19,73

 

ikilic1461_1-1731410251992.png

I am also adding model to here , my study is inventor 2021

Thanks in advance. 

 

 

0 Likes
Accepted solutions (1)
1,103 Views
4 Replies
Replies (4)
Message 2 of 5

m_baczewski
Advocate
Advocate
Accepted solution

@ikilic1461 

 

Hello, 

 

d308 is the parameter of flat pattern count. Try this:

 

iProperties.Mass = Double.NaN
iProperties.Mass = iProperties.Mass - (10.13 * (d308-1))

 Let me know if its working. 😄

0 Likes
Message 3 of 5

ikilic1461
Enthusiast
Enthusiast

Hi @m_baczewski ,

It is so simple and good solution, thanks for your feedback, it worked well. 

Just little something more , how can I add 10.13 kg to this part's iproperties.mass and make it parametric?

Because 10.13 may vary each time. 

 

ikilic1461_0-1731423994863.png

 

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

Hi @ikilic1461.  I can not use your ZIP file, due to security where I work, but have you considered setting those patterned components to 'reference'?

WCrihfield_0-1731424095230.png

ComponentOccurrence.BOMStructure 

BOMStructureEnum 

Setting them to reference should remove them from BOM quantities, so it should also remove them from overall Mass also.  But I have not used this for Mass manipulation before, so it is just a theory at this point.

 

Edit:  You could also have a ModelState in which that pattern is suppressed, then get the Mass value while that pattern is suppressed.  Suppressing the pattern should not also suppress the original component that the pattern made copies of.  Or you could just overwrite Mass using the Mass while it is suppressed, then un-suppress it again.  Just some additional thoughts.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

ikilic1461
Enthusiast
Enthusiast

Hi @WCrihfield ; 

I don't want to remove from them BOM qty. Just want to keep only one item's mass and whole item's qty. 

If I do reference , they will not seem in BOM as you also clarifed . 

However, I sorted it with ilogic codes. 

Thanks for your support @m_baczewski  and @WCrihfield . 

0 Likes