Community
Hi All,
Is there an equivalent for the function below for Assemblies?
oPart.ComponentDefinition.MassProperties.PrincipalMomentsOfInertia(J(1), J(2), J(3))
If I use this same function in an Assembly I get an error.
Presumably, moments of inertia for assemblies are handled differently?
Any suggestions?
Solved! Go to Solution.
Solved by Michael.Navara. Go to Solution.
It works as expected
Sub GetPrincipalMomentsOfInertiaOfAssembly()
Dim asmDef As AssemblyComponentDefinition
Set asmDef = ThisApplication.ActiveEditDocument.ComponentDefinition
Dim i1 As Double
Dim i2 As Double
Dim i3 As Double
Call asmDef.MassProperties.PrincipalMomentsOfInertia(i1, i2, i3)
End Sub
So it does - I went back over my scenario and realised that the assembly that was having the problem was a Phantom Assembly with virtual components only, so there are no solid bodies, and therefore no mass props.
Can't find what you're looking for? Ask the community or share your knowledge.