Change Views
Change Views
(OP)
hi every body
im having a trouble tryng to get the isometric view. the code im using is the following.
under this code i change the view of the part and trying to get the isometric so the part can rotate from the isometric, but what is doing, is rotaring to isometric from the last rotate
my english is not so good, hope you can undestand me, thank you so much for your help.
Language="VBSCRIPT"
Sub CATMain()
For x = 0 to 1
For y = 0 to 1
For z = 0 to 1
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewpoint3D1.PutSightDirection Array(z, y, z)
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewpoint3D1.PutSightDirection Array(0, 1, 0, 0, 0, 1)
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
Next
Next
Next
End Sub
im having a trouble tryng to get the isometric view. the code im using is the following.
under this code i change the view of the part and trying to get the isometric so the part can rotate from the isometric, but what is doing, is rotaring to isometric from the last rotate
my english is not so good, hope you can undestand me, thank you so much for your help.
Language="VBSCRIPT"
Sub CATMain()
For x = 0 to 1
For y = 0 to 1
For z = 0 to 1
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewpoint3D1.PutSightDirection Array(z, y, z)
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewpoint3D1.PutSightDirection Array(0, 1, 0, 0, 0, 1)
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
Next
Next
Next
End Sub





RE: Change Views
ISO View
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 CATIA.StartCommand"Fit All In" End SubRegards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Change Views
it works perfectly
RE: Change Views
Ferdinand,
Can you send the "step-by-step" direction for the script that you've just replied with?................
MZ7DYJ
RE: Change Views
What does it means "step-by-step" direction ? Something like :
Copy and paste the text in code area in a text editor (like Notepad) and change the extension of the saved file to CATScript, then run it thru CATIA menu or simple double click on the CATScript file.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...