See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: align text to a line.

  1. #1
    Member Chris Matira's Avatar
    Join Date
    2005-08
    Location
    Philippines
    Posts
    41
    Login to Give a bone
    0

    Default align text to a line.

    anyone got a lisp routine that makes a text align parallel to a line?

    i'm having a lot of time spent rotating text to make it parallel to a line.. this would really help...

    thanks...

  2. #2
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    1

    Default Re: align text to a line.

    Here is a simple code in the fly for you to start with
    no errorhandler, no user trapping security
    just rotate selected text equal to one selected line.
    Code:
    (defun c:AlignText (/ VlaObjLine LinAngle VlaObjText )
      (vl-load-com )
      (setq VlaObjLine (vlax-ename->vla-object (car (entsel "Select the line : " ))) )
      (setq LinAngle   (vla-get-Angle VlaObjLine ) )
      (while (setq VlaObjText (vlax-ename->vla-object (car (entsel "Select the text : " ))))
        (vla-put-Rotation VlaObjText LinAngle )
        (vlax-release-object VlaObjText )
      )
      (vlax-release-object VlaObjLine )
      (princ)
    )
    : ) Happy Computing !

    kennet

  3. #3
    Member Chris Matira's Avatar
    Join Date
    2005-08
    Location
    Philippines
    Posts
    41
    Login to Give a bone
    0

    Default Re: align text to a line.

    thanks kenneth...

  4. #4
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    450
    Login to Give a bone
    0

    Default Re: align text to a line.

    If you have Express then it has a command that does that also, it's called torient, but it asks for two points to get the rotation angle instead of a line.

  5. #5
    Woo! Hoo! my 1st post
    Join Date
    2013-01
    Posts
    1
    Login to Give a bone
    0

    Default Re: align text to a line.

    Hi Thanks for the Code, is any one having a lisp that can align the text parallel to polyline with certain given distance means offsets from the source polyline.

    Thanks in advance.

Similar Threads

  1. Replies: 9
    Last Post: 2012-02-27, 08:50 PM
  2. Auto align line to text
    By j-majm in forum AutoLISP
    Replies: 3
    Last Post: 2010-04-19, 08:21 AM
  3. align text with angled line
    By ray salmon in forum Revit Architecture - General
    Replies: 4
    Last Post: 2008-12-29, 04:37 PM
  4. align text with angled line
    By ray salmon in forum Revit Architecture - General
    Replies: 6
    Last Post: 2008-08-12, 04:31 AM
  5. Align the control line AND the text?
    By m.vanitallie in forum AutoCAD Civil 3D - Sections
    Replies: 0
    Last Post: 2008-02-08, 02:29 AM

Posting Permissions

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