Language="VBSCRIPT" Sub CATMain() Set documents1 = CATIA.Documents Set partDocument1 = documents1.Add("Part") Set part1 = partDocument1.Part Set bodies1 = part1.Bodies Set body1 = bodies1.Item("Hauptkörper") Set hybridShapeFactory1 = part1.HybridShapeFactory Set originElements1 = part1.OriginElements Set hybridShapePlaneExplicit1 = originElements1.PlaneYZ Set reference1 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1) Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, 10.127328, False) body1.InsertHybridShape hybridShapePlaneOffset1 part1.InWorkObject = hybridShapePlaneOffset1 part1.Update Set reference2 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1) Set hybridShapePlaneOffset2 = hybridShapeFactory1.AddNewPlaneOffset(reference2, -10.127328, False) body1.InsertHybridShape hybridShapePlaneOffset2 part1.InWorkObject = hybridShapePlaneOffset2 part1.Update Set sketches1 = body1.Sketches Set hybridShapes1 = body1.HybridShapes Set reference3 = hybridShapes1.Item("Ebene.1") Set sketch1 = sketches1.Add(reference3) Dim arrayOfVariantOfDouble1(8) arrayOfVariantOfDouble1(0) = 10.127328 arrayOfVariantOfDouble1(1) = 0.000000 arrayOfVariantOfDouble1(2) = 0.000000 arrayOfVariantOfDouble1(3) = 0.000000 arrayOfVariantOfDouble1(4) = 1.000000 arrayOfVariantOfDouble1(5) = 0.000000 arrayOfVariantOfDouble1(6) = 0.000000 arrayOfVariantOfDouble1(7) = 0.000000 arrayOfVariantOfDouble1(8) = 1.000000 sketch1.SetAbsoluteAxisData arrayOfVariantOfDouble1 part1.InWorkObject = sketch1 Set factory2D1 = sketch1.OpenEdition() Set geometricElements1 = sketch1.GeometricElements Set axis2D1 = geometricElements1.Item("Absolute Achse") Set line2D1 = axis2D1.GetItem("H-Richtung") line2D1.ReportName = 1 Set line2D2 = axis2D1.GetItem("V-Richtung") line2D2.ReportName = 2 Set point2D1 = factory2D1.CreatePoint(10.000000, 0.000000) point2D1.ReportName = 3 Set point2D2 = factory2D1.CreatePoint(7.071068, 7.071068) point2D2.ReportName = 4 Set point2D3 = factory2D1.CreatePoint(0.000000, 10.000000) point2D3.ReportName = 5 Set point2D4 = factory2D1.CreatePoint(-7.071068, 7.071068) point2D4.ReportName = 6 Set point2D5 = factory2D1.CreatePoint(-10.000000, 0.000000) point2D5.ReportName = 7 Set point2D6 = factory2D1.CreatePoint(-7.071068, -7.071068) point2D6.ReportName = 8 Set point2D7 = factory2D1.CreatePoint(-0.000000, -10.000000) point2D7.ReportName = 9 Set point2D8 = factory2D1.CreatePoint(7.071068, -7.071068) point2D8.ReportName = 10 Set line2D3 = factory2D1.CreateLine(10.000000, 0.000000, 7.071068, 7.071068) line2D3.ReportName = 1000 line2D3.StartPoint = point2D1 line2D3.EndPoint = point2D2 Set line2D4 = factory2D1.CreateLine(7.071068, 7.071068, 0.000000, 10.000000) line2D4.ReportName = 1001 line2D4.StartPoint = point2D2 line2D4.EndPoint = point2D3 Set line2D5 = factory2D1.CreateLine(0.000000, 10.000000, -7.071068, 7.071068) line2D5.ReportName = 1002 line2D5.StartPoint = point2D3 line2D5.EndPoint = point2D4 Set line2D6 = factory2D1.CreateLine(-7.071068, 7.071068, -10.000000, 0.000000) line2D6.ReportName = 1003 line2D6.StartPoint = point2D4 line2D6.EndPoint = point2D5 Set line2D7 = factory2D1.CreateLine(-10.000000, 0.000000, -7.071068, -7.071068) line2D7.ReportName = 1004 line2D7.StartPoint = point2D5 line2D7.EndPoint = point2D6 Set line2D8 = factory2D1.CreateLine(-7.071068, -7.071068, -0.000000, -10.000000) line2D8.ReportName = 1005 line2D8.StartPoint = point2D6 line2D8.EndPoint = point2D7 Set line2D9 = factory2D1.CreateLine(-0.000000, -10.000000, 7.071068, -7.071068) line2D9.ReportName = 1006 line2D9.StartPoint = point2D7 line2D9.EndPoint = point2D8 Set line2D10 = factory2D1.CreateLine(7.071068, -7.071068, 10.000000, 0.000000) line2D10.ReportName = 1007 line2D10.StartPoint = point2D8 line2D10.EndPoint = point2D1 part1.Update Set reference4 = hybridShapes1.Item("Ebene.2") Set sketch2 = sketches1.Add(reference4) Dim arrayOfVariantOfDouble2(8) arrayOfVariantOfDouble2(0) = -10.127328 arrayOfVariantOfDouble2(1) = 0.000000 arrayOfVariantOfDouble2(2) = 0.000000 arrayOfVariantOfDouble2(3) = 0.000000 arrayOfVariantOfDouble2(4) = 1.000000 arrayOfVariantOfDouble2(5) = 0.000000 arrayOfVariantOfDouble2(6) = 0.000000 arrayOfVariantOfDouble2(7) = 0.000000 arrayOfVariantOfDouble2(8) = 1.000000 sketch2.SetAbsoluteAxisData arrayOfVariantOfDouble2 part1.InWorkObject = sketch2 Set factory2D2 = sketch2.OpenEdition() Set geometricElements2 = sketch2.GeometricElements Set axis2D2 = geometricElements2.Item("Absolute Achse") Set line2D11 = axis2D2.GetItem("H-Richtung") line2D11.ReportName = 1 Set line2D12 = axis2D2.GetItem("V-Richtung") line2D12.ReportName = 2 Set point2D9 = factory2D2.CreatePoint(10.000000, 0.000000) point2D9.ReportName = 3 Set point2D10 = factory2D2.CreatePoint(7.071068, 7.071068) point2D10.ReportName = 4 Set point2D11 = factory2D2.CreatePoint(0.000000, 10.000000) point2D11.ReportName = 5 Set point2D12 = factory2D2.CreatePoint(-7.071068, 7.071068) point2D12.ReportName = 6 Set point2D13 = factory2D2.CreatePoint(-10.000000, 0.000000) point2D13.ReportName = 7 Set point2D14 = factory2D2.CreatePoint(-7.071068, -7.071068) point2D14.ReportName = 8 Set point2D15 = factory2D2.CreatePoint(-0.000000, -10.000000) point2D15.ReportName = 9 Set point2D16 = factory2D2.CreatePoint(7.071068, -7.071068) point2D16.ReportName = 10 Set line2D13 = factory2D2.CreateLine(10.000000, 0.000000, 7.071068, 7.071068) line2D13.ReportName = 1000 line2D13.StartPoint = point2D9 line2D13.EndPoint = point2D10 Set line2D14 = factory2D2.CreateLine(7.071068, 7.071068, 0.000000, 10.000000) line2D14.ReportName = 1001 line2D14.StartPoint = point2D10 line2D14.EndPoint = point2D11 Set line2D15 = factory2D2.CreateLine(0.000000, 10.000000, -7.071068, 7.071068) line2D15.ReportName = 1002 line2D15.StartPoint = point2D11 line2D15.EndPoint = point2D12 Set line2D16 = factory2D2.CreateLine(-7.071068, 7.071068, -10.000000, 0.000000) line2D16.ReportName = 1003 line2D16.StartPoint = point2D12 line2D16.EndPoint = point2D13 Set line2D17 = factory2D2.CreateLine(-10.000000, 0.000000, -7.071068, -7.071068) line2D17.ReportName = 1004 line2D17.StartPoint = point2D13 line2D17.EndPoint = point2D14 Set line2D18 = factory2D2.CreateLine(-7.071068, -7.071068, -0.000000, -10.000000) line2D18.ReportName = 1005 line2D18.StartPoint = point2D14 line2D18.EndPoint = point2D15 Set line2D19 = factory2D2.CreateLine(-0.000000, -10.000000, 7.071068, -7.071068) line2D19.ReportName = 1006 line2D19.StartPoint = point2D15 line2D19.EndPoint = point2D16 Set line2D20 = factory2D2.CreateLine(7.071068, -7.071068, 10.000000, 0.000000) line2D20.ReportName = 1007 line2D20.StartPoint = point2D16 line2D20.EndPoint = point2D9 part1.Update Set shapeFactory1 = part1.ShapeFactory Set loft1 = shapeFactory1.AddNewLoft() Set hybridShapeLoft1 = loft1.HybridShape hybridShapeLoft1.SectionCoupling = 3 hybridShapeLoft1.Relimitation = 1 hybridShapeLoft1.CanonicalDetection = 2 Dim item1 Set sketch1 = item1.GetItem("Skizze.1") Set reference1 = part1.CreateReferenceFromObject(sketch1) Set reference2 = part1.CreateReferenceFromBRepName("WireFVertex:(Vertex:(Neighbours:(Face:(Brp:(Sketch.1;1002);None:();Cf11:());Face:(Brp:(Sketch.1;1001);None:();Cf11:()));Cf11:());WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", sketch1) hybridShapeLoft1.AddSectionToLoft reference1, -1, reference2 Dim item2 Set sketch2 = item2.GetItem("Skizze.2") Set reference3 = part1.CreateReferenceFromObject(sketch2) Set reference4 = part1.CreateReferenceFromBRepName("WireFVertex:(Vertex:(Neighbours:(Face:(Brp:(Sketch.2;1002);None:();Cf11:());Face:(Brp:(Sketch.2;1001);None:();Cf11:()));Cf11:());WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)", sketch2) hybridShapeLoft1.AddSectionToLoft reference3, -1, reference4 part1.InWorkObject = hybridShapeLoft1 part1.Update End Sub