• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Drafting Techniques

    Reply
    Contributor
    Posts: 15
    Registered: ‎07-27-2009

    Need LISP to draw line / pline to match TEXT rotation!

    331 Views, 4 Replies
    10-07-2011 12:10 PM

    I have searched everywhere but have found nothing. There are a ton of lisp to match text rotation to a selected line, but not vice versa.

    Anyone out there have anything?

    Please use plain text.
    Mentor
    coopdetat
    Posts: 187
    Registered: ‎03-25-2011

    Re: Need LISP to draw line / pline to match TEXT rotation!

    10-10-2011 08:53 AM in reply to: econnerly

    I have a routine I use to rotate viewports which first sets the snapangle to the selected object rotation. If you select text and then escape the routine you can place a line with ortho on to get what you want. I don't think it works with mtext though.

     

    http://www.paracadd.com/lisp/rotx.lsp

     

    HTH

    ---------------------------------------------Signature--------------------------------------------
    Civil Design Professional Since 1983 (Intergraph), AutoCAD since 1989

    It is said that a fool's voice is known by multitude of words... I'm
    just writing this stuff instead of saying it outloud... that's my loophole.

    Windows 7 Professional 64-bit - Service Pack 1
    Intel﴾R﴿ Core﴾TM﴿ i7-3820 CPU 3.60GHz; 16 GB DDR3 Dual Channel RAM
    nVidia Quadro 4000; AutoCAD Civil 3D 2013, sp1
    Please use plain text.
    *Expert Elite*
    GrantsPirate
    Posts: 1,263
    Registered: ‎08-15-2008

    Re: Need LISP to draw line / pline to match TEXT rotation!

    10-10-2011 01:05 PM in reply to: econnerly

    Use UCS, Ojbect option, pick text

     

    I have a simple macro so I type UO, pick the object.  And UW for UCS, World to get back.

    Please use plain text.
    Valued Contributor
    Posts: 60
    Registered: ‎12-21-2009

    Re: Need LISP to draw line / pline to match TEXT rotation!

    08-27-2012 03:16 PM in reply to: econnerly

    I have autocad 2011. Use ALIGN command. It rotates an object the way it rotates text like TORIENT command, only vise versa. align can rotate any object.

     

    ROse

    Please use plain text.
    Valued Contributor
    smaher12
    Posts: 70
    Registered: ‎11-20-2011

    Re: Need LISP to draw line / pline to match TEXT rotation!

    03-14-2013 06:20 AM in reply to: econnerly

    econnerly wrote:

    I have searched everywhere but have found nothing. There are a ton of lisp to match text rotation to a selected line, but not vice versa.

    Anyone out there have anything?


    This will set your snapang to the selected text angle. HTH

     

    (defun C:tmp ()

       (setq esel (entsel "\nSelect text: "))  

       (setq edata (entget (car esel)))  

       (setvar 'snapang (cdr (assoc '50 edata)))  

      (princ)

    )

     

     

    Please use plain text.