Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
1066 Views, 7 Replies

Mass Properties update with Custom LOD

Dear All

please let me know the code (Ilogic / VBA) for updating mass properties with Custom LOD

 

thanks in advance

 

V.Sureshkumar

 

Xun.Zhang
in reply to: Anonymous

@Anonymous,

 

Some thoughts here.

 

Go through all unsuppressed components and get the physical properties from each components.

 

Thanks!


Xun

Hi,

 

Following code will represent you the Mass of the LOD!

 

Public Sub massprop()

Dim a As AssemblyDocument
Set a = ThisApplication.ActiveDocument
Dim b As MassProperties ' ComponentDefinition
Set b = a.ComponentDefinition.MassProperties

MsgBox b.Mass

End Sub

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Anonymous
in reply to: bradeneuropeArthur

 

 

Dear Bradeneurope

 

 

Thanks for the code, its showing the mass properties value, but i like to update the mass properties with Custom LOD through ilogic.

 

please let me know

 

BR

 

 

bradeneuropeArthur
in reply to: Anonymous

ThisApplication.CommandManager.ControlDefinitions.Item("AppUpdateMassPropertiesCmd").Execute

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Anonymous
in reply to: bradeneuropeArthur

Dear Bradeneurope

 

Thanks for the update, the below code is working in Master LOD which i am already using, but its not working in Custom LOD, please see the attached snap shot

 

ThisApplication.CommandManager.ControlDefinitions.Item("AppUpdateMassPropertiesCmd").Execute

 

BR

 

V.Sureshkumar

 

bradeneuropeArthur
in reply to: Anonymous

Can you put the value in the iproperty mass?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

llorden4
in reply to: Anonymous

Ever find a solution for this you can share?

Autodesk Inventor Certified Professional