79253991

Date: 2024-12-05 09:14:18
Score: 2
Natty:
Report link

@ C R johnson's code , working good

Sub CATMain()
    ' Check if CATIA is running
    If CATIA Is Nothing Then
        MsgBox "CATIA is not running."
        Exit Sub
    End If

    ' Try to collapse all
    On Error Resume Next
    CATIA.StartCommand ("Collapse All")
    If Err.Number <> 0 Then
        MsgBox "Failed to execute command: " & Err.Description
        Err.Clear
    End If
    On Error GoTo 0
End Sub
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: New User With you