Or you could try the Emmett Ross one:
Sub CATMain()
Dim ObjViewer3D As Viewer3D
Set objViewer3D = CATIA.ActiveWindow.ActiveViewer
Dim objCamera3D As Camera3D
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1)
' Input box to name the screen capture image file
Dim...
Sorry I can't test it right now.
Try this:
Sub CaptureViewport(strFileName As String, Optional intWidth As Integer = 1024, Optional intHeight As Integer = 1024)
Dim objWindow As SpecsAndGeomWindow
Dim objViewer As Variant ' Viewer3D
Dim objCamera As Camera3D
Dim objViewpoint As...
Try this:
Sub CaptureScreenshot()
Dim CATIA As Object
Set CATIA = GetObject(, "CATIA.Application")
If CATIA Is Nothing Then
MsgBox "CATIA is not running. Please start CATIA and try again."
Exit Sub
End If
Dim doc As Object
Set doc = CATIA.ActiveDocument
If Not doc Is Nothing Then
Dim...
Hi! I take this opportunity to ask you help about something i'm struggling for.
I'm trying to write a macro that measures some lines and write the output in a csv file.
These lines are called "feet-line", and are objects of some (not all) catparts inside the active catproduct.