Results 1 to 9 of 9

Thread: Align Text to picked point

  1. #1
    Member
    Join Date
    2017-10
    Posts
    21
    Login to Give a bone
    0

    Default Align Text to picked point

    Hello Everyone
    I need a code that can align text (from X or Y of insertion point) to "x" or "y" of a picked point.In fact, when I pick a point,the word will move to that X,maintaining the Y coordinate or to the Y of picked point,maintaining the X coordinate. Does anybody have such a lisp?
    Thanks in advance

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,504
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Have you looked into the "TORIENT" (text orient) command?
    It is an express tool under "rotate text" but you simply pick the text and then 2 points and it orients the text to those points/angle.
    Works with TEXT, MTEXT and ATTDEF etc..

    Not sure it that will help but it's a great tool.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Also at: https://www.cadtutor.net/forum/topic...-picked-point/
    and: http://www.theswamp.org/index.php?ac...ast_msg=594284

    - - - Updated - - -

    Move and align are two completely different things. Can you better describe what you're trying to do?

  4. #4
    Member
    Join Date
    2017-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Hello
    I don't want to rotate or scale (the way "align" works).I just want to put the word at the same vertical or horizontal level of the picked point, e.g. the endpoint of a line..As if I grab the word from its insertion point and move it to that place...The command would beick a place to use its "x".Then:Select words that will update their "x" to last one..I wish I explained enough..
    Thanks

  5. #5
    Member
    Join Date
    2017-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Hello
    "Torient" rotates the text...I just want to update its x or y coordinate depending on the picked point, e.g. endpoint of a line.The command line may ask to update x or y to match that of picked point.I wish I better explained.
    Thanks

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Quote Originally Posted by RamiMann View Post
    Hello
    I just want to update its x or y coordinate depending on the picked point, e.g. endpoint of a line.The command line may ask to update x or y to match that of picked point.I wish I better explained.
    Thanks
    That's what Point Filters are used for.

  7. #7
    Member
    Join Date
    2017-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Hello
    Yes, Point Filters can help but with my case I have to hold every word from the insertion point,go to the endpoint of the line,type ".x" for example to use it for the word...I hope to automate these steps and not to type ".x" for every instance of words.
    The code ATX written by Peter Jamtgaard at http://www.theswamp.org/index.php?to...9681#msg119681 is good,but takes the word from left corner and not from insertion point,in addition you have to select H or V for every instance...
    thanks a lot

  8. #8
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    There is already a Shortcut Menu for filters built in. Add two more to it for a quick solution.
    Use these Names, Macros, and Element IDs

    NewY
    .XZ _non @
    ID_PointNewY

    NewX
    .YZ _non @
    ID_PointNewX

    Pick a grip and NewY will use the existing X & Z prompting you to select a point for the new Y value. NewX would prompt you for the new X value.
    It's not limited to Mtext either.
    Last edited by Tom Beauford; 2019-05-09 at 06:34 PM. Reason: Added _non to make sure the existing X & Z will be used no matter the OSMODE, OSNAPCOORD or OSNAPNODELEGACY settings.

  9. #9
    Member
    Join Date
    2017-10
    Posts
    21
    Login to Give a bone
    0

    Default Re: Align Text to picked point

    Hello
    Great idea, thanks a lot

Similar Threads

  1. Replies: 10
    Last Post: 2021-06-01, 11:51 AM
  2. CV12-4: One Point, Two Point, Red Point, Blue Point
    By Autodesk University in forum Civil Infrastructure
    Replies: 0
    Last Post: 2013-04-17, 04:50 AM
  3. Replies: 3
    Last Post: 2009-05-28, 12:20 AM
  4. Determining if a Point is picked inside a 3D Solid
    By roger_wall in forum VBA/COM Interop
    Replies: 0
    Last Post: 2007-02-01, 12:07 AM
  5. Associative dimensions that remember side of point picked
    By lcamara in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2005-01-14, 11:16 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
  •