how to keep model in isometric view in catia vb scripting macro (not in drawing workbench)

125 Views Asked by At

I am trying to run macro that can call Isometric View in Catia

I run this bellow line to execute the ISO view, but not working

CATIA.StartCommand "Isometric View"

or

CATIA.StartCommand "*iso"
1

There are 1 best solutions below

0
Shrotter On

You can use the predefined cameras for that:

Sub CATMain()

Dim oCamera as Camera
Dim oViewer as Viewer

Set oCamera = CATIA.ActiveDocument.Cameras.Item(1) 'or per Name "* iso"
Set oViewer = CATIA.ActiveWindow.ActiveViewer

oViewer.Viewpoint3D  = oCamera.Viewpoint3D

End Sub

I recommend to avoid StartCommands as much as possible.

Also I recommend you to get used to: recording macros, analyse them with the object resolution/object browser and the V5Automation.chm to get an entry in the available objects and methods.