MapInfo Pro Developers User Group

Expand all | Collapse all

Insert page in layout workarounds

  • 1.  Insert page in layout workarounds

    Posted 12-09-2020 08:41
    Until the ability to add a page in the middle of a layout is available does  anyone have any strategies they use to add a page?
    We create layouts where the order of the pages is important for map books and comparing the extents of each page during review.

    I'm considering saving the map window ID's for the existing pages and trying to bump each window down 1 page.

    This feature is on the ideas page from 2018 (https://ideas.precisely.com/ideas/MIPRO-I-967) please vote for it if you also need this feature.​

    ------------------------------
    Jay Russell
    CenterPoint Energy
    Houston TX
    ------------------------------


  • 2.  RE: Insert page in layout workarounds

    Posted 12-10-2020 02:09
    Hi Jay

    Here's a basic way to to what you are after

    Declare Sub Main

    Sub Main

    Note "Starting"

    Set Layout Page 1
    Set Layout Selection All
    Run Menu Command 203
    Note "Copied content on page 1"

    Set Layout Page 2
    Run Menu Command 204
    Note "Pasted content on page 2"

    Set Layout Page 1
    Set Layout Selection All
    Run Menu Command 2915
    Note "Deleted content on page 1"

    End Sub

    The script will copy all content from page 1, paste it to page 2 and then delete everything on page 1.

    As I'm using the menu commands to perform these actions they will behave as if the user clicked on them. This also means that you might get warnings if you are deleting elements that can't be recreated.

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------