Hi Lee
You need the ID of the window.
If you have the name of the map, you can loop through the open windows and look for the window with that name.
Something along these lines:
sWinName = "Main Map"
For nWin = 1 To NumWindows()
nWID = WindowID(nWin)
If WindowInfo(nWID, WIN_INFO_NAME) = sWinName Then
Set Window nWID Front
Exit For
End If
Next
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 12-08-2020 16:40
From: Lee Crosby
Subject: Mapbasic to Activate specific Map window
Hi All,
I am working with MapCad tools in Mapbasic. Before I can call a tool the map window with the geometry that I am editing must be the Active or Front window.
Ideally I'd like to select the map window by name then make that window active/front. What would be the code to achieve this?
Thanks.
------------------------------
Lee Crosby
Campaspe Shire Council
Echuca VIC
------------------------------