Results 1 to 8 of 8

Thread: How to get dwg variables in annotation expression builder?

  1. #1
    Active Member norrin's Avatar
    Join Date
    2005-01
    Posts
    55
    Login to Give a bone
    0

    Default How to get dwg variables in annotation expression builder?

    I've been tinkering with annotations and have gotten stumped on this one. I just want the insertion scale to be tied to dimscale. I havent found a way to get any drawing variables into the expression builder !dimscale doesnt work.
    Anybody have any clues?

    Next question would be what is the expression to get the annotation to rotate along a polyline that may/may not have arcs in it. I'm assuming that it uses a combo of the .bulge and .angle variables but I'm not sure, anybody done this before
    Thanks

  2. #2
    Active Member norrin's Avatar
    Join Date
    2005-01
    Posts
    55
    Login to Give a bone
    0

    Red face Re: How to get dwg variables in annotation expression builder?

    ok looks like I'm not going to be able to this without assigning a lisp variable the dimscale value, thats fine I can do that.

    getting the annotation to rotate along a polyline segment is going to be another issue. dealing with lisp also.

    Does anyone have an good reference for the expression evaluator in the annotation template? Or any examples of how they use it? Does anyone use it?

    So far I'm just using it my standalone dwgs to lable things and not with queries or anything like that.

    thanks

  3. #3
    Active Member
    Join Date
    2005-01
    Posts
    60
    Login to Give a bone
    0

    Default Re: How to get dwg variables in annotation expression builder?

    try using diesel, not lisp for this (angtos) and (strtos) are two of my favorites, and for sure try queries

  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: How to get dwg variables in annotation expression builder?

    Take a look at this query it aligns text to roads/plines. Change the txt to qry and it should load in map.
    J. Murphy
    AKA
    Murph
    The former AutoCAD MAP3D Power User

  5. #5
    Active Member norrin's Avatar
    Join Date
    2005-01
    Posts
    55
    Login to Give a bone
    0

    Default Re: How to get dwg variables in annotation expression builder?

    thanks so much for the replies, I'll check into them.

    I cant seem to get the email notification to stick in my preferences, so I didnt know about the replies till I just dropped in.

  6. #6
    Active Member norrin's Avatar
    Join Date
    2005-01
    Posts
    55
    Login to Give a bone
    0

    Default Re: How to get dwg variables in annotation expression builder?

    had some time to get back to this, jmuphy's qry code worked real good. I just have one question about it.

    Is there anyway to make it set the rotation to where the text doesnt appear upside down?
    I'm assuming there would be a way to add an if statement in there that would be something like this:

    if (ang >=91 and <= 270) (+ ang 180) ang

    I know that is not the correct syntax for the diesel but I hope I get my point across. I tried to add one in there but to no avail, I'm still trying.
    Also I have some lines that will have multiple segments, this code doesnt really align the text well in that situation. Is there a way to make the text align to a segment of a polyline?

    Thanks for all the help.

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

    Default Re: How to get dwg variables in annotation expression builder?

    Quote Originally Posted by dbushman
    had some time to get back to this, jmuphy's qry code worked real good. I just have one question about it.
    Just to give credit to where it's due. I think it was Mark Oliver of Autodesk that came up with that little bit of code. Now 30 years ago when I could do algebra forwards and backward faster than my teachers I might of been able to figure something out., but the booze and nicotine killed off to many brain cells for it today.
    J. Murphy
    AKA
    Murph
    The former AutoCAD MAP3D Power User

  8. #8
    Active Member norrin's Avatar
    Join Date
    2005-01
    Posts
    55
    Login to Give a bone
    0

    Wink Re: How to get dwg variables in annotation expression builder?

    ALGEBRA!
    Is that what that is? dang, now that you told me that I'll never get it

    me and algebra never did jive, even all those years ago (-+ 20), must have been the booze and nictotine

    thanks again for passing that qry to me.

Similar Threads

  1. Replies: 1
    Last Post: 2014-06-16, 07:54 PM
  2. some help with a macro expression
    By Doodlemusmaximus in forum AutoCAD Customization
    Replies: 4
    Last Post: 2011-03-21, 10:49 AM
  3. Help with expression
    By fclao in forum AutoLISP
    Replies: 3
    Last Post: 2010-02-24, 10:52 PM
  4. Appending to an expression in annotation template
    By JeremiahM in forum AutoCAD Map 3D - General
    Replies: 9
    Last Post: 2004-07-26, 05:01 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
  •