Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

CATIA V5 Product Annotation View Creation

Status
Not open for further replies.

Jegsaran

Automotive
Dec 16, 2020
41
0
0
IN
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)
 
Replies continue below

Recommended for you

This is a CATIA question, not one about programming languages in general.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
I posted here because this is regarding VBA which is a programming language used in some applications.
I think I have posted in wrong thread.
 
Status
Not open for further replies.
Back
Top