Sub CATMain() Dim product2 As Product ' 'Aktives Document auswaehlen Dim productDocument1 As Document Set productDocument1 = CATIA.ActiveDocument ' 'Hauptprodukt auswaehlen Dim product1 As Product Set product1 = productDocument1.Product ' 'Auflistung der Unterprodukte Dim products1 As Products Set products1 = product1.Products ' ' Auswahl der Unterprodukte aus der Auflistung "products1" ' bzw. Deklarationen innerhalb der Schleife Dim CoGValue (2) As Array Dim dMass As Double Dim dCoordinates(2) Dim oInertia As AnyObject Dim dVolumen Dim dArea Dim dDensity As Double Dim dMoments(2) Dim Matrix(8) ' For I = 1 To (product1.Products.Count) Set product2 = products1.Item(I) product2.ActivateDefaultShape() ' 'Berechnen von Inertia Mass Set oInertia = product2.GetTechnologicalObject("Inertia") dMass = oInertia.Mass oInertia.GetCOGPosition dCoordinates ' 'Berechnen von Inertia Volume Set oAnalyze = product2.Analyze dVolumen = oAnalyze.Volume ' 'Berechnen von Inertia Area dArea = oAnalyze.WetArea ' 'Berechnen von Density dDensity = oInertia.Density/1000 If dDensity = "-0,001" Then dDensity = "Not uniform" End if ' 'Berechnen der Momente M1,M2,M3 oInertia.GetPrincipalMoments dMoments ' 'Berechnen der Inertia Matrix G oInertia.GetInertiaMatrix Matrix ' ' Daten schreiben '... Next End Sub