Hi Joel
Some valid points you bring up here. Knowing MapBasic is a big advantage here. And yes, we certainly should try to support user that don't know MapBasic better.
To get the cartographic scale from an embedded map, you can use this SmartText:
$mb{MapperInfo(LayoutItemWinID(CurContext(1), "Map-1", 1), 33)}
This does require that you change the name of the frame with your map to Map-1.
I have added this to my SmartTextAlias.xml file so that I can use an Alias instead:
${ScaleOfMap-1}
I have attached my SmartTextAlias.xml for reference. You need to copy it to this location if you want to reuse it:
%appdata%\MapInfo\MapInfo\Professional\1700
Also I want to point you towards a post discussion the SmartTexts in some more detail:
How to take Advantage of SmartTexts in Layout and Layout Templates.
And this webinar might also be of interest if you haven't already watched it:
Layout Templates – Tips & Tricks webinar series, October 24, 2018------------------------------
Peter Horsbøll Møller
Pitney Bowes
------------------------------
Original Message:
Sent: 01-16-2019 21:12
From: Joel Cranston
Subject: Smart Text - More examples please
Hi,
I am currently using the included smart text titleblock template to copy and use smart text examples and i am currently stuck on the simple task of being able to use smart text to show the cartographic scale of the current map? and unfortunately i am not great with code.
I also began thinking that i will not be the only one going to experience this, so i thought it might be nice at some stage to have included an option to insert Smart Text and be presented with a linked page or an in-built dialog showing me all the Smart text possibilities by categories like dates, scales etc. kind of like a function search in excel?
Cheers
------------------------------
Joel Cranston
Lockyer Valley Regional Council
------------------------------