Yes I have, many thanks Peter
------------------------------
Jane Mason
Biological Records Officer (GIS), Suffolk Biodiversity Information Service, UK
------------------------------
Original Message:
Sent: 08-21-2019 08:23
From: Peter Horsbøll Møller
Subject: MapBasic v 17.0.3 (64-bit) - altering text in Layout Legend Frames in MapInfo Pro v 17.0.3 (64-bit)
Hi Jane
You might already have seen the answer I provide in the MapInfo Pro Developers Community.
------------------------------
Peter Horsbøll Møller
Pitney Bowes
Original Message:
Sent: 08-21-2019 07:07
From: Jane Mason
Subject: MapBasic v 17.0.3 (64-bit) - altering text in Layout Legend Frames in MapInfo Pro v 17.0.3 (64-bit)
Hello all, I wonder if you can help me?
I'm trialling MapInfo v 17.0.3 and needing to re-write some of our MapBasic tools. I don't know MapBasic so mainly need to copy and paste from the MapBasic window.
We have been using an in-house tool with MapInfo v15 and earlier which runs a search on several layers, styles a map with the results and creates a Legend Designer which we could then insert into a Layout frame (created from a workspace). Now, because the new Layout Designer does not take in old Legend Designer windows as frames, I want to make a new tool which, after we open our Layout workspace (which includes 2 map frames and 2 text frames), creates Legend Frames for all the map layers and then amends the text in each Legend Frame so that we have our standard legend back.
I have managed to create the Legend Frames, but I am failing to alter the Legend Frame text. I have looked here
http://support.pitneybowes.com/SearchArticles/VFP05_KnowledgeWithSidebarHowTo?id=kA180000000Xg0MCAS&popup=false;&lang=en_US
but I think this only applies to Text Frames, not Legend Frames.
The text for the Legend Frame creation, which works, is:
Create Designer Legend Portrait Default Frame Title "#" Font ("Arial",0,8,0) Default Frame Region Height 11 Units "pt" Frame From Layer 1 Frame
etc. for each layer
I then have:
Alter Designer Frame Id 1 Title "Data Enquiry" Font ("Arial", 0, 10, 0)
Alter Designer Frame Id 1 Style Font("Arial", 0, 7, 0) ID 1 Text "Search Point" ID 2 Text "Search Area"
etc. for each layer
This is copied from the MapBasic window (apart from removing window ids like Window 3051) when I do it manually, but when I run this from the mbx, nothing happens - the text isn't changed.
Am I using the wrong terms, or is it something to do with the Frame Ids? I really need to automate this as we run the process several times a day.
Any help would be greatly appreciated,
Many thanks,
Jane
------------------------------
Jane Mason
Biological Records Officer (GIS), Suffolk Biodiversity Information Service, UK
------------------------------