Public Function COM_X(Arg1 As Double) As Double ' Set a reference to the part document. ' This assumes a part document is active. Dim oPartDoc As PartDocument Set oPartDoc = ThisDocument Stop ' Set a reference to the mass properties object. 'Dim oMassProps As ComponentDefinition 'Set oMassProps = ThisDocument.ComponentDefinition.MassProperties 'Set the accuracy to medium. 'oMassProps.Accuracy = k_Medium ' Schwerpunktkoordinaten 'COM_X = oMassProps.CenterOfMass.X COM_X = 6.302 'Stop End Function