Jim
What Smart Text are you using? Can you share the expression?
I tried configuring a couple of SmartText to display the scale.
The top one is showing the cartographic scale and the bottom one is showing the map scale
The expressions for the two examples are like this:
${MapCartographicScale}
: referring to a SmartText alias for this expression:
$mb{"Scale: " + MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_CARTO_SCALE_EXPR)}
and this custom SmartText expression:
$mb{"1 cm = " + MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_SCALE) + " " +MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_DISTUNITS)}
The second expression, I can improve to round the value to the nearest integer and format using my regional settings:
$mb{"1 cm = " + FormatNumber$(Round(MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_SCALE), 1)) + " " +MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_DISTUNITS)}
Please note that my expression expects you to use cm as your paper units. If you are using different units, change it to the appropriate units in the string, such as inch:
$mb{"1 in = " + FormatNumber$(Round(MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_SCALE), 1)) + " " +MapperInfo(LayoutItemWinID(CurContext(1), 1, LAYOUT_ITEM_TYPE_MAPPER), MAPPER_INFO_DISTUNITS)}
Would this work for you too?
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 05-20-2022 13:45
From: Jim Coleman
Subject: Map Scale Smart Text
When using Smart Text to display map scale in a layout, are there any formatting options available? I have a set of maps that I'm printing at 1"=60' and sometimes the text displayed will change to will change to something like 1"=60.0000012'. Can you format it to only display whole numbers?
------------------------------
Jim
------------------------------