Hello world!
I need to create a CATIA macro that create a drawing from a product automatically!
I already began this macro and i created the front view
subsequently i want to show the format A0 and to define the isometric view! to change the format of axis and add references A ,B, C!
I need to create a CATIA macro that create a drawing from a product automatically!
I already began this macro and i created the front view
Code:
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim drawingDocument1 As Document
Set drawingDocument1 = documents1.Add("Drawing")
Dim drawingSheets1 As DrawingSheets
Set drawingSheets1 = drawingDocument1.Sheets
Dim drawingSheet1 As DrawingSheet
Set drawingSheet1 = drawingSheets1.Item("Calque.1")
Dim drawingViews1 As DrawingViews
Set drawingViews1 = drawingSheet1.Views
Dim drawingView1 As DrawingView
Set drawingView1 = drawingViews1.Add("AutomaticNaming")
Dim drawingViewGenerativeLinks1 As DrawingViewGenerativeLinks
Set drawingViewGenerativeLinks1 = drawingView1.GenerativeLinks
Dim drawingViewGenerativeBehavior1 As DrawingViewGenerativeBehavior
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
Dim productDocument1 As Document
Set productDocument1 = documents1.Item("Mayrou.CATProduct")
Dim product1 As Product
Set product1 = productDocument1.Product
drawingViewGenerativeBehavior1.Document = product1
drawingViewGenerativeBehavior1.DefineFrontView -0.999967, 0.008088, 0.000000, 0.000000, 0.000000, 1.000000
drawingView1.x = 600
drawingView1.y = 500
drawingView1.Scale = 0.5
Set drawingViewGenerativeBehavior1 = drawingView1.GenerativeBehavior
drawingViewGenerativeBehavior1.Update
subsequently i want to show the format A0 and to define the isometric view! to change the format of axis and add references A ,B, C!