dddn
Mechanical
- Nov 26, 2022
- 35
Hello everyone.
I'm writing for a little help: is there the possibility of automating the "View from 3D" generation process to put on a View created on a 3D model (Annotation view) on a drawing?
Actualy I use this code manualy, with StartCommand but I'dont put the view on a Sheet because I can't click on a sheet automaticaly.
Thank's for your help.
Code:
Sub CATMain()
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")
CATIA.StartCommand ("View from 3D")
Set ThatWindow = CATIA.Windows.Item("Part1.CATPart")
ThatWindow.Activate
Set part1 = CATIA.Documents.Item("Part1.CATPart")
Set selection= part1.Selection
selection.Clear
selection.Search "Name='Front View 1',all"
End Sub