View Full Version : 2016 Concatenated Annotation Labels
dpresley58437170
2016-11-01, 10:25 PM
(.. using Map 2016)
I've used MAPIMPORT to bring subsets of data into a specific area from .shp files representing utility lines and appurtenances. The extended data is contained within these, and I'm trying to define an annotation template that will allow stringing several properties together and possibly adding text. Is there a way to do this?
For instance, SIZE and MATERIAL might be properties, and I'd want the label to pull these so the final text reads Exist. 8" PVC WW.
I've tried different approaches to syntax in the expression entry bar when making an annotation template, but apparently I'm missing something. Things like:
concat ( '<string>' , <Expression> , <etc> ) like you'd see in the data schema when adding labels to GIS features. Also,
(substr "<string>" &Data@DataProperty) but this one just regurgitates the expression when used.
Any help would be appreciated.
Jmurphy
2016-11-02, 11:37 PM
The Map anno blocks use lisp not the VB/VBA/C++ or etc functions. The correct function is (Strcat ................. )
An example (strcat :STREETNAME@strts_clarksville " " :TYPE@strts_clarksville) the @strts_clarksville is the name of the Object data table STREETNAME and TYPE are field names. the " " Quotes leave a black space in the label between the two fields.
dpresley58437170
2016-11-03, 08:34 PM
Thanks, Murph. This is what I'm using...
(strcat "EX " :DIAMETER@Default_WWMain " " :MATERIAL@Default_WWMain " WW (" :PROJECT@Default_WWMain ")" ) <- The smiley is supposed to by colonD
...but when I insert it, I only get the Tag name. In this case, "WWTest".
I've tried using (chr 40) and (chr 41) for the parenthesis, but get the same results.
Are there syntax restrictions other than what I would normally expect from lisp?
I really appreciate you responding to this.
Jmurphy
2016-11-03, 10:24 PM
Try
(strcat "EX ":DIAMETER@Default_WWMain " " :MATERIAL@Default_WWMain " WW " :PROJECT@Default_WWMain )
If that doesn't work can you post part of your dwg?
dpresley58437170
2016-11-07, 09:39 PM
Got the same result - just the name of the tag.
Here's a single line of the wastewater.
Jmurphy
2016-11-07, 11:30 PM
This works
(STRCAT :DIAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain)
Use the single quote (2 times) for the inch mark.
dpresley58437170
2016-11-09, 03:09 PM
Thanks Murph.
Yes, it does! I copied it to a new one and tried to expand upon it. None of the following approaches worked:
(strcat "EX " :DIAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain)
(strcat :DIAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain " " :PROJECT@Default_WWMain)
(strcat :DIAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain " WW")
etc... There were a couple of variations on this theme that were attempted, but no go.
After each attempt, I'd return the expression to the one you sent (i.e., removing the additional items I'd placed) and it worked fine.
Are there limitations to this I'm not aware of? I've worked with lisp for years and it seems I should be able to string text and properties to the moon and back as long as the syntax is correct.
Any ideas?
Jmurphy
2016-11-09, 11:46 PM
As far as I know there is no limitations as long as you have the correct syntax. You may not be holding you tongue right. :)
dpresley58437170
2016-11-10, 07:26 PM
:) Thanks, Murph. I'll take a deep breath and try it again. I'm sure there's some little something in there that's being overlooked.
I appreciate your help.
In the meantime, if you or anyone else has insight into why the variations above weren't working, I'd be grateful.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.