Sub CATMain() uCommand = InputBox ( "Schnittebenen definieren (X, Y, Z)" & Chr(10) & "(Eingabewerte mit sind mit Doppelpunkten zu trennen)" & Chr(10) & "Beispiel: 10:20:30", " Schnittdefinition ") Dim varSplit varSplit = Split(uCommand, ":") If UBound(varSplit) <> 2 Then MsgBox ("Fehlerhafte Eingabe!" & Chr(10) & "Makro wird beendet!") Exit Sub End If Dim cSections On Error Resume Next Set cSections = CATIA.ActiveDocument.Product.GetTechnologicalObject("Sections") If Err.Number <> 0 Then MsgBox ("Kein Dokument aktiv!") Exit Sub End If Dim oMasterSection Dim MatrixPos(11) Set oMasterSection = cSections.Add oMasterSection.Name = "Schnitt_vorn" oMasterSection.Width = 5000 oMasterSection.Height = 5000 oMasterSection.Thickness = 5000 oMasterSection.Type = 0 '0=Plane/1=Slice/2=Box oMasterSection.CutMode = 1 '0=No Cut/1=Volume Cut MatrixPos(0) = 0 'X component of the X-axis MatrixPos(1) = 1 'Y component of the X-axis MatrixPos(2) = 0 'Z component of the X-axis MatrixPos(3) = 0 'X component of the Y-axis MatrixPos(4) = 0 'Y component of the Y-axis MatrixPos(5) = 1 'Z component of the Y-axis MatrixPos(6) = 1 'X component of the Z-axis MatrixPos(7) = 0 'Y component of the Z-axis MatrixPos(8) = 0 'Z component of the Z-axis MatrixPos(9) = 50 'X component of the origin (Ursprung) MatrixPos(10) = 0 'Y component of the origin (Ursprung) MatrixPos(11) = 0 'Z component of the origin (Ursprung) oMasterSection.SetPosition MatrixPos End Sub