Text Along a Curve (ATTC) macro
wgdevanna
Newcomer
Hi all,
I would like to have a macro or hotspot that automatically sets the sheet/layer and text properties (font, spacing, height, etc), ask for the text, ask to select the curve and insert the formatted text along the curve.
I tried putting the following in a hotspot:
SAVESETTINGS
SETLAYER Text labels
GL tx ^DEnter Text
IFERR edtextm
COLOR 238
TSPECA 0
TSPECF Times New Roman
TSPECH 2.45
TSPECJ 3
TSPECP 150
TSPECS 0
TSPECT 1.55
ATTC
tx
^DPlace Text:
GETSETTINGS
:edtextm
ENDM
where ATTC replaced TEXM , but it doesn't work. The script does work with TEXM.
Is there a way to make this work?
Tagged:
Comments
Not like that. ATTC isn't macro friendly, and there aren't a macro version of this command.
BUT, any non-macro command can appear as the very last command in a macro, and since you ask the user for input anyway, he can just as well type it in the dialog as the command line, so you can do it like this:
However, this does mean that things like SAVESETTINGS won't be possible, or more precisely, you won't be able to restore the saved settings since you can't call GETSETTINGS after ATTC. Only option there is a separate "restore settings" hotspot. You'll also noticed I removed your error check, and changed SETLAYER to GOLAYER so it will never cause an error.
Thanks Remy. Knowing that I can use it the way you describe is helpful. I am creating a map template where the user can click hotspots to set the text specs for the various items they need to label so things remain consistent.