Macro to take screenshot in CATIA V5 (Exercise 1)

Описание к видео Macro to take screenshot in CATIA V5 (Exercise 1)

I have mentioned the program written for this video
please the below for the program
Sub CATMain()
Dim ObjViewer3D As Viewer3D
Set objViewer3D = CATIA.ActiveWindow.ActiveViewer
Dim objCamera3D As Camera3D
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1)
Dim partName As String
partName = Inputbox ("Please name the image.")
If partName=""Then

MsgBox "No name entered", vbExclamation, "Cancel Pressed"

Else
'file location to save image
Dim fileloc As String
fileloc = "C:\Macro Files\"
Dim exten As String
exten = ".png"
Dim strName as string
strname = fileloc & partName & exten
objViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D
CATIA.ActiveDocument.Selection.Clear()
objViewer3D.FullScreen = True
objviewer3D.Capturetofile 4,strname
End If
End Sub

PLEASE SUBSCRIBE TO GET CONTINOUS UPDATES

Комментарии

Информация по комментариям в разработке