MapInfo Pro

Welcome to the MapInfo Pro community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only
  • 1.  Get Map Window ID from Layout Frame

    Posted 02-07-2018 20:00

    MapInfo Pro v 16 - MapBasic. Is it possible to reference a Map Frame, on a Layout Designer by ID in order to send "Set Map Window ...." statements? Thank you!



  • 2.  RE: Get Map Window ID from Layout Frame

    Posted 02-12-2018 09:19

    Yes, you can get the window ID of the map frame by using LayoutItemInfo with the attribute LAYOUT_ITEM_INFO_WIN, which has the value 5. For example, if your map frame has a frame id = 1, then it would be

    map_win_id = LayoutItemInfo(layout_win_id, 1, 5)

    In version 17 MapBasic, you'll be able to pass a string name of a frame, and/or use a new function to get map, browser, and legend window IDs. For example, if you've given your map frame a name of "Map 1", then you will be able to use

    LayoutItemInfo(layout_win_id, "Map 1", 5)

    to get is window ID instead of having to know its frame ID.