Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

code to creat projection view using

Status
Not open for further replies.

madmax123

Mechanical
May 19, 2022
2
IN
code to creat projection view using macros
 
Replies continue below

Recommended for you


Dim oDocs As Documents
Set oDocs = CATIA.Documents

Dim oDOc As DrawingDocument
Set oDOc = CATIA.ActiveDocument

Dim oDoc1 As Document
Set oDoc1 = oDocs.Item("1.CATPart")

Dim oDRoot As DrawingRoot
Set oDRoot = oDOc.DrawingRoot

Dim oSheet As DrawingSheet
Set oSheet = oRoot.Item("Sheet.1")

Dim oViews As DrawingViews
Set oViews = oSheet.Views

Dim oView As DrawingView
Set oView = oViews.Add("Front View")

Dim oGb As DrawingViewGenerativeBehavior
Set oGb = oView.GenerativeBehavior

oGb.Document = oDoc1

oGb.DefineFrontView 0#, 1#, 0#, 0#, 0#, 1#

oSheet.Update

Dim rightview1 As DrawingView
Set rightview1 = oViews.Add("Right view")
Dim orightviewGb As DrawingViewGenerativeBehavior
Set orightviewGb = rightview1.GenerativeBehavior

rightview1.GenerativeBehavior.DefineProjectionView oGb, catRightView

orightview.DefineProjectionView

oSheet.Update


help me to get projection view

 
record a macro when you create the projection view. that will give you a working code.

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top