I would do a very simple MACRO : "Fit All In" on Part, and Put view in Isometric.
Fit All In works, but VBA has a problem with Viewpoint3D Objet
as PutSightDirection, VBA tell me "Objet not in
I am on CATIA R2018, maybe there is a error now? Or I do a mistake....
I have Found a Method with Command Line, but sometime no works if I put 2 Command Lines in same Code... So I would like understand and make a good Code :)
Public Sub center_view_main()
If TypeName(CATIA.ActiveDocument) <> "PartDocument"
MsgBox "This program only works on a CATPart."
Dim oViewer As Viewer3D
Set oViewer = CATIA.ActiveWindow.ActiveViewer
Dim myViewpoint As Viewpoint3D
Set myViewpoint = oViewer.Viewpoint3D
myViewpoint.PutSightDirection Array(-0.577350258827209, -0.577350258827209, -0.577350258827209) ' No Works
CATIA.StartCommand "* iso"