i have an update
i do a macro who creat front and right view of a catpart, know i wanna do the samething for a catproduct
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
drawingViewGenerativeBehavior1.SetGPSName "DefaultGenerativeStyle.xml"
Set documents1 = CATIA.Documents
'===============
strFilePath = CATIA.FileSelectionBox("Select part", "*.CATPart", 0)
If strFilePath = "" Then Exit Sub
Set partDocument1 = CATIA.Documents.open(strFilePath)
'===============
Set product1 = partDocument1.GetItem("Part1")
drawingViewGenerativeBehavior1.Document = product1
drawingViewGenerativeBehavior1.DefineFrontView 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000
drawingView1.x = 1500
drawingView1.y = 420.500000
drawingView1.Scale = 1.000000
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
drawingViewGenerativeBehavior1.Update
drawingView1.Activate
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheet1 = drawingSheets1.ActiveSheet
Set drawingViews1 = drawingSheet1.Views
Set drawingView1 = drawingViews1.ActiveView
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
Set drawingView2 = drawingViews1.Add("AutomaticNaming")
Set drawingViewGenerativeBehavior2 = drawingView2.GenerativeBehavior
drawingViewGenerativeBehavior2.DefineProjectionView drawingViewGenerativeBehavior1, catfrontView
Set drawingViewGenerativeLinks2 = drawingView2.GenerativeLinks
Set drawingViewGenerativeLinks1 = drawingView1.GenerativeLinks
drawingViewGenerativeLinks1.CopyLinksTo drawingViewGenerativeLinks2
drawingView2.x = 594.500000
drawingView2.y = 420.500000
Dim double1
double1 = drawingView1.Scale
drawingView2.Scale = 1.000000
Set drawingViewGenerativeBehavior2 = drawingView2.GenerativeBehavior
drawingViewGenerativeBehavior2.Update
drawingView2.ReferenceView = drawingView1
drawingView2.AlignedWithReferenceView
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set specsViewer1 = specsAndGeomWindow1.ActiveViewer
specsViewer1.Reframe
specsViewer1.Reframe
End Sub
so i change the red statement by that but it doesn't work
Set product1 = productDocument1.GetItem("Product1")
also i wanna do a cut of front view i need help to do that