×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Script to set front view of a surface

Script to set front view of a surface

Script to set front view of a surface

(OP)
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

RE: Script to set front view of a surface

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 --> CATScript

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

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

RE: Script to set front view of a surface

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources