Jegsaran
Automotive
- Dec 16, 2020
- 42
Hello All,
I need your help, I am trying to create a TPS Section View in my product. So that I can import it into my drawing.
I am creating a plane from a part of a sub level assembly and trying to use it to create the section view.
So far this long I came. I am getting error in the last line.
Language = CATVba
Set ActDoc = CATIA.ActiveDocument
Set prdRoot = ActDoc.Product
Set opartDoc = ActDoc.Item("Reference Part")
Set part1 = opartDoc.Part
Set hybridShapeFactory1 = part1.HybridShapeFactory
Set axisSystems1 = part1.AxisSystems
Set axisSystem1 = axisSystems1.Item("Axis System.front")
Set reference1 = part1.CreateReferenceFromBRepName("RSur
Face
Brp
AxisSystem.2;3);None
);Cf11
));WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR29)", axisSystem1)
Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, 0#, False)
Set hybridBodies1 = part1.HybridBodies
Set hybridBody1 = hybridBodies1.Item("Planes")
hybridBody1.AppendHybridShape hybridShapePlaneOffset1
part1.InWorkObject = hybridShapePlaneOffset1
hybridShapePlaneOffset1.Name = "Front Plane"
part1.Update
Set oAnnotationSets = prdRoot.GetTechnologicalObject("CATAnnotationSets")
Set oNewSet = oAnnotationSets.AddInAProduct(prdRoot, "ISO")
Set viewFactory1 = oNewSet.TPSViewFactory
Set cutview = oNewSet.CreateView(hybridShapePlaneOffset3, 1)
I need your help, I am trying to create a TPS Section View in my product. So that I can import it into my drawing.
I am creating a plane from a part of a sub level assembly and trying to use it to create the section view.
So far this long I came. I am getting error in the last line.
Language = CATVba
Set ActDoc = CATIA.ActiveDocument
Set prdRoot = ActDoc.Product
Set opartDoc = ActDoc.Item("Reference Part")
Set part1 = opartDoc.Part
Set hybridShapeFactory1 = part1.HybridShapeFactory
Set axisSystems1 = part1.AxisSystems
Set axisSystem1 = axisSystems1.Item("Axis System.front")
Set reference1 = part1.CreateReferenceFromBRepName("RSur
Set hybridShapePlaneOffset1 = hybridShapeFactory1.AddNewPlaneOffset(reference1, 0#, False)
Set hybridBodies1 = part1.HybridBodies
Set hybridBody1 = hybridBodies1.Item("Planes")
hybridBody1.AppendHybridShape hybridShapePlaneOffset1
part1.InWorkObject = hybridShapePlaneOffset1
hybridShapePlaneOffset1.Name = "Front Plane"
part1.Update
Set oAnnotationSets = prdRoot.GetTechnologicalObject("CATAnnotationSets")
Set oNewSet = oAnnotationSets.AddInAProduct(prdRoot, "ISO")
Set viewFactory1 = oNewSet.TPSViewFactory
Set cutview = oNewSet.CreateView(hybridShapePlaneOffset3, 1)