Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Script to set front view of a surface

Status
Not open for further replies.

Aviatorbarath

New member
Dec 27, 2012
35
US
How to set a front or side view of selected part using vba in catia

what code or command has to be used

Any suggestions will be helpful

Regards
Barath
 
Replies continue below

Recommended for you

This is the code to put active 3D document in ISO view. In same way you can do it for a selection and set to what view you want....

Code:
Sub CATMain()
Dim ActDoc As Document
Set ActDoc = CATIA.ActiveDocument
Dim camIsoView As Camera3D
Set camIsoView = ActDoc.Cameras.Item("* iso")
Dim objIsoViewPoint As Viewpoint3D
Set objIsoViewPoint = camIsoView.Viewpoint3D
Dim ActWin As Window
Set ActWin = CATIA.ActiveWindow
Dim ActViewer As Viewer3D
Set ActViewer = ActWin.ActiveViewer
ActViewer.Viewpoint3D = objIsoViewPoint
End Sub

Regards
Fernando

 
Before get your life complicated using a macro, in order to set shortcuts to reorient the model, create a new toolbar and fill it with the icons of the default views (front, back, isometric, etc) and then assign shortcuts to those icons. I set the shortcuts as in Solidworks: ctrl+1 for back, ctrl+2 for front, etc.

Hope this helps.

Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top