See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Concatenated Annotation Labels

  1. #1
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Concatenated Annotation Labels

    (.. 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.
    Last edited by dpresley58437170; 2016-11-02 at 09:01 PM.

  2. #2
    Geospatial Moderator Jmurphy's Avatar
    Join Date
    2000-11
    Location
    TN/KY Area
    Posts
    1,640
    Login to Give a bone
    1

    Default Re: Concatenated Annotation Labels

    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.

  3. #3
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    Thanks, Murph. This is what I'm using...

    (strcat "EX " IAMETER@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.

  4. #4
    Geospatial Moderator Jmurphy's Avatar
    Join Date
    2000-11
    Location
    TN/KY Area
    Posts
    1,640
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    Try
    (strcat "EX "IAMETER@Default_WWMain " " :MATERIAL@Default_WWMain " WW " :PROJECT@Default_WWMain )

    If that doesn't work can you post part of your dwg?

  5. #5
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    Got the same result - just the name of the tag.

    Here's a single line of the wastewater.
    Attached Files Attached Files

  6. #6
    Geospatial Moderator Jmurphy's Avatar
    Join Date
    2000-11
    Location
    TN/KY Area
    Posts
    1,640
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    This works
    (STRCAT IAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain)

    Use the single quote (2 times) for the inch mark.
    Attached Files Attached Files

  7. #7
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    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 " IAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain)
    (strcat IAMETER@Default_WWMain "'' " :MATERIAL@Default_WWMain " " :PROJECT@Default_WWMain)
    (strcat IAMETER@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?

  8. #8
    Geospatial Moderator Jmurphy's Avatar
    Join Date
    2000-11
    Location
    TN/KY Area
    Posts
    1,640
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    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.

  9. #9
    Member
    Join Date
    2013-11
    Posts
    36
    Login to Give a bone
    0

    Default Re: Concatenated Annotation Labels

    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.

Similar Threads

  1. 2014: Annotation Labels (Bearings/Distances)
    By CCarleton in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2015-12-30, 11:12 PM
  2. multiple labels based on annotation scale
    By Wish List System in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2015-05-05, 10:46 PM
  3. Add "Maintain Annotation Orientation" parameter to "Labels"
    By Wish List System in forum Revit MEP - Wish List
    Replies: 0
    Last Post: 2014-04-29, 06:42 PM
  4. Annotation Labels
    By bdumas in forum Revit Architecture - General
    Replies: 2
    Last Post: 2010-08-10, 06:43 AM
  5. Purge Annotation Scales That Are Not the Current Active Annotation Scale
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-02-01, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •