Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Catia Macro- Drafting "View from 3D"

Status
Not open for further replies.

dddn

Mechanical
Nov 26, 2022
35
View_from_3d_hhcpw7.png


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
 
Replies continue below

Recommended for you

yupp, I use mouse_event with MOUSEEVENTF_LEFTDOWN and MOUSEEVENTF_LEFTUP to emulate a Single Click. In VBA, not VBScript though...

regards,
LWolf
 
Hi LWolf thank you for your answer; can you post an exemple of the code of your solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor