Add mass in iParts

Add mass in iParts

johannes_santos
Enthusiast Enthusiast
382 Views
2 Replies
Message 1 of 3

Add mass in iParts

johannes_santos
Enthusiast
Enthusiast

Hello, I have a question, I am making a iParts according to a catalog, I have to put the weight appears here, with the help i found this code

 

doc = ThisDoc.Document
customPropertySet = doc.PropertySets.Item("Inventor User Defined Properties")
prop = customPropertySet.Item("mymassoverride")
iProperties.Mass = prop.Value

 

But the units dont come out whit decimal. 

Thanks

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

A.Acheson
Mentor
Mentor
Accepted solution

Hi @johannes_santos 

Your going to have issues setting the override of the mass for each member. You can actually only set the override for the whole factory this is the same result manually or by using code. So the only way to get the mass correct is to actually model the ipart accurately and or adjust the material density etc or perform some operation on the part that changes the mass and can be set through the table. 

 

Maybe you might consider modelstates or as another extreme workaround publish to CC then place as standard and manually override the mass. 

 

Member 1

AAcheson_0-1698269801268.png

Member 2

AAcheson_1-1698269836554.png

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 3

johannes_santos
Enthusiast
Enthusiast

Ok thank for your help

 

0 Likes