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 TugboatEng 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
Joined
May 19, 2022
Messages
2
Location
IN
code to creat projection view using macros
 

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