Mass Properties update with Custom LOD

Mass Properties update with Custom LOD

Anonymous
Not applicable
1,251 Views
7 Replies
Message 1 of 8

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
1,252 Views
7 Replies
Replies (7)
Message 2 of 8

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
Message 3 of 8

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 & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


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:
My 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 !


 


EESignature

0 Likes
Message 4 of 8

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
Message 5 of 8

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

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


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:
My 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 !


 


EESignature

0 Likes
Message 6 of 8

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
Message 7 of 8

bradeneuropeArthur
Mentor
Mentor
Can you put the value in the iproperty mass?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


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:
My 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 !


 


EESignature

0 Likes
Message 8 of 8

llorden4
Collaborator
Collaborator

Ever find a solution for this you can share?

Autodesk Inventor Certified Professional
0 Likes