Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Macro : Check if the windows is a DMU Navigator 1

Status
Not open for further replies.

nekcorp

New member
Mar 3, 2015
12
Hi,

I would like to know if the active window is a DMU Navigator or not. Can you help me ?

Below the code I use. When I launch it I have the error message at the line TypeOf activeWin Is NavigatorWindow:
Compilation Error:
Type defined by the user is undefined



Code:
Sub VerifierDMUNavigator()

    
    Dim activeWin As Object
    Set activeWin = CATIA.ActiveWindow
    
    ' Check if the active window is an instance of NavigatorWindow
    If TypeOf activeWin Is NavigatorWindow Then
        MsgBox "You are in DMU Navigator"
    Else
        MsgBox "You are not in DMU Navigator."
    End If
    
End Sub

Thanks for your help
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor