MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only
  • 1.  Having some issues with layout frames

    Posted 02-01-2018 22:23

    Hello,

     

    I'm having some troubles getting maps into the new layout through Mapbasic.

    The best approach seems te be to first create an empty frame (or using the clear to command to make it so) & then add maps to it.

     

    This i can do using the Map From ... into window LayoutID ID x command.

     

    I do not know how to alter the layers in the map frame using the set map command, as i have no way to find out the windowID of the map frame in the layout.

    Any pointers how to query a specific map frame ID? 

     

    I've tried using the LayoutItemInfo() function with LAYOUT_ITEM_INFO_WIN as attribute, which should return this ID, yet it returns -1. 

    No idea what that stands for.

     

    Best regards

    Pieter



  • 2.  RE: Having some issues with layout frames

    Posted 02-02-2018 14:36

    Hi Pieter,

    You should be able to use LayoutItemInfo(layout_window, frame_id, LAYOUT_ITEM_INFO_WIN) to get the window ID of the map you just inserted into the empty frame given by frame_id. Perhaps you could share some of you code with me and I can help you figure out what's going on?

    -Michele Buselli



  • 3.  RE: Having some issues with layout frames

    Posted 02-05-2018 16:59

    Hi Pieter,.

    Just wondering if you were able to figure out your code problem? If you're getting back a -1 from LayoutItemInfo when using the LAYOUT_ITEM_INFO_WIN attribute, that means the frame_id you're querying is not a window (it's not a map or browser). So maybe you are passing the wrong frame_id. Please let me know if I can still be of any assistance.

    -Michele Buselli