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

Mass Properties update with Custom LOD

Anonymous

Mass Properties update with Custom LOD

Anonymous
Not applicable

Dear All

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

 

thanks in advance

 

V.Sureshkumar

 

0 Likes
Reply
1,065 Views
7 Replies
Replies (7)

Xun.Zhang
Alumni
Alumni

@Anonymous,

 

Some thoughts here.

 

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

 

Thanks!


Xun
0 Likes

bradeneuropeArthur
Mentor
Mentor

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 !

0 Likes

Anonymous
Not applicable

 

 

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

 

 

0 Likes

bradeneuropeArthur
Mentor
Mentor
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 !

0 Likes

Anonymous
Not applicable

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

 

0 Likes

bradeneuropeArthur
Mentor
Mentor
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 !

0 Likes

llorden4
Collaborator
Collaborator

Ever find a solution for this you can share?

Autodesk Inventor Certified Professional
0 Likes