Thanks for the advice Peter.
I've never used MapBasic previously but I can see it or Python is something I may have to learn.
To be honest (and again I make no apologies for saying so) I'm finding it frustrating that a lot of basic functionality I had available in ESRI previously requires a lot of additional effort in MapInfo Pro.
A lot of rethinking in terms of how I approach things ahead.
I really appreciate the support available.
Kind regards
Mark
Notice of confidential information
This e-mail is intended only for the use of the addressee. If you are not the addressee, you are requested not to distribute or photocopy this message. If you have received this message in error, please immediately notify the sender and destroy the original message. Views and opinions expressed in this transmission are solely those of the author and do not necessarily represent those of Meander Valley Council.
Original Message:
Sent: 3/17/2023 9:29:00 AM
From: Peter Møller
Subject: RE: Copy/drag legend to layout
Hi Mark
You may be able to use the MapBasic window to get this done.
Open the Mapbasic window
Now insert the legend for the layer on a single of your pages.
Notice how the MapBasic window captures the statement for you
Now comes the tricky part where you have to modify the statement slightly to make it work.
This is the statement you see in the MapBasic window. Window 3141
will be different for you as that refers to a specific window. We need to change this to work for the window on the current page in your layout. To do so, you need to change the number into this statement which will get the ID of the map window in the frame on the layout. Hopefully, you only have one frame with a map on each page.
Create Designer Legend
From Window 3141
Portrait Default Frame Style "#" Font ("Arial",0,8,0) Frame From Layer 1 Using column object label default
Your statement may also differ in other ways depending on the legend you create.
This is the statement you need to insert instead of the number:
LayoutItemInfo(FrontWindow(), LayoutItemID(FrontWindow(), "", LAYOUT_ITEM_TYPE_MAPPER), LAYOUT_ITEM_INFO_WIN)
Your statement will look similar to this:
Create Designer Legend
From Window LayoutItemInfo(FrontWindow(), LayoutItemID(FrontWindow(), "", LAYOUT_ITEM_TYPE_MAPPER), LAYOUT_ITEM_INFO_WIN)
Portrait Default Frame Style "#" Font ("Arial",0,8,0) Frame From Layer 1 Using column object label default
You can also change the position of the frame through the MapBasic if you prefer.
Right-click the legend frame that you have manually moved to its right location, select Frame Properties, and make a note of its Top-Left X and Y .
You can now use this statement to change the position of the frame. It's important that you run this statement after inserting the new legend frame as the statement will move the last item on the page.
Alter Designer Frame
Window FrontWindow()
Id LayoutInfo(FrontWindow(), LAYOUT_INFO_NUM_ITEMS)
Position (0.936, 22.207)
Let us know if this works for you
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 03-16-2023 18:22
From: Mark McGovern
Subject: Copy/drag legend to layout
I have just come across this old issue after having created a layout with 25 pages. Just as I thought I was done, one of my layers had disappeared from every page. First, I'm not sure how that was even possible, second I'm glad that I could reinstate the layers using the Multi Mapper Helper. It did leave the problem that the legend needs to be recreated for each page as I can't copy and paste it. As each page has 25 different map extents, I'm not about to copy and paste the map then reset to the extent and scale required (In hindsight I should have saved named views). I feel that the least path of resistance is to recreate my legend 25 times. Unless I'm missing something it is quite surprising that after 6 years there doesn't seem to be an easier work around for this.
I did try to use Site Mapper for this project but I found it is too restrictive in what I wanted to do and 2, it just didn't work.
Even though I've only been using MapInfo a short time it is quite apparent that there is a dire need for a decent tool for creating a map series that doesn't require duplication of map layouts that then requires any changes to be done individually if you don't get it right first time. This is a frequent requirement of my job and it's a bit frustrating that it doesn't appear to have a high degree of urgency to improve functionality.
------------------------------
Mark McGovern
Knowledge Community Shared Account
Original Message:
Sent: 11-13-2017 00:57
From: Rob Swan
Subject: Copy/drag legend to layout
This is definitely needed. An example of when it is useful - we create flood depth maps with the same scale using a thematic, and all the base map data is the same. For different floods, we have different spatial extents but all the legend information is unchanged. Creating a new legend in for each layout is not a good use of time. A workaround has been to a duplicate of the map with the correct legend and hide that map off the layout window, which maintains the custom legend, whilst displaying the map with the real data. Not optimal, but it works.