Derived part density

Derived part density

Anonymous
Not applicable
484 Views
1 Reply
Message 1 of 2

Derived part density

Anonymous
Not applicable

When I derive a part from an assembly I need to know the density of the original assembly as it would be in the assembly model. I can get to it ONLY if the mass has been updated on the assembly. Is there a way to update the mass of the assembly using VBA so I can get the density through the derived part? 

0 Likes
Accepted solutions (1)
485 Views
1 Reply
Reply (1)
Message 2 of 2

frederic.vandenplas
Collaborator
Collaborator
Accepted solution

Hi,

 

You can update the mass of the assembly from within a part document just by asking the referenced document how much the mass is

Public Sub UpdateDerivedAssembly()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oAss As AssemblyDocument
Set oAss = oDoc.ReferencedDocuments(1)
Debug.Print oAss.ComponentDefinition.MassProperties.Mass
End Sub

 

If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
0 Likes