Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA V5 Product Annotation View Creation

Status
Not open for further replies.

Jegsaran

Automotive
Joined
Dec 16, 2020
Messages
42
Location
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)
 
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.

Part and Inventory Search

Sponsor

Back
Top