Open a table like States, create a layout and add a map frame to it.
Run this in MapBasic Window
** assumes Layout is FrontWindow, and only 1 frame in Layout (the map frame), else pass the frame number if different frame.
Would need to loop through Layout frames and see which one is map frame type otherwise to get its number.
Select * from States where State = "MT" into Selection
Set Window LayoutItemInfo(FrontWindow(), 1, LAYOUT_ITEM_INFO_WIN) Front
Set map Zoom Entire Selection
Regards,
-Bill
------------------------------
Bill Wemple
Principal Software Engineer, Quality Management
Precisely, Inc
precisely.com
------------------------------
Original Message:
Sent: 05-18-2022 10:23
From: Jim Coleman
Subject: Find Selection in Map Frame
Is there a way to activate a map frame and find selection in MapBasic 2021?
------------------------------
Jim
------------------------------