+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Full Member
    Discipline
    Electrical
    Using
    AutoCAD 2016
    Join Date
    Apr 2017
    Posts
    56

    Default LISP to make text middle justified

    Registered forum members do not see this ad.

    Hello, Is there a LISP to make text middle justified?

  2. #2
    Full Member
    Discipline
    Electrical
    Using
    AutoCAD 2016
    Join Date
    Apr 2017
    Posts
    56

    Default

    And, preferably begin the move command grabbing the center basepoint, since that's usually what happens next in order to move it to the middle of an object.

  3. #3
    Senior Member
    Computer Details
    StevJ's Computer Details
    Operating System:
    Xp Pro
    Using
    AutoCAD 2014
    Join Date
    Sep 2008
    Location
    Bremerton, Wa
    Posts
    135

    Default

    Take a look at this as maybe a place to start.

    Steve

  4. #4
    Senior Member
    Computer Details
    iconeo's Computer Details
    Operating System:
    Windows
    Discipline
    Multi-disciplinary
    iconeo's Discipline Details
    Occupation
    CAD Manager/Draftsman
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2017
    Join Date
    Jun 2007
    Location
    Seattle
    Posts
    259

    Default

    I use the following as a macro.

    Code:
    ^C^C(COMMAND "LAYER" "M" "S-ANNO-TEXT" "C" "7" "" "") 'textstyle standard 'textsize $M=$(if,$(=,$(getvar,cvport),1),0.0703125,$(*,0.0703125,$(getvar,dimscale))) mtext \j bc w 0;

  5. #5
    Full Member
    Discipline
    Electrical
    Using
    AutoCAD 2016
    Join Date
    Apr 2017
    Posts
    56

    Default

    bump bump bump bump

  6. #6
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    1,062

    Default

    One of the first associations I did was from this code from Tharwat,
    pointing out this fragment from his code:
    Code:
    (progn
      (vla-put-attachmentpoint mt acmiddlecenter)
      (vla-move mt (vla-get-insertionpoint mt) p)
    )
    Later I was doing such stuff in my codes aswell, but I'll always remember that thread he helped me.

  7. #7
    Full Member
    Discipline
    Electrical
    Using
    AutoCAD 2016
    Join Date
    Apr 2017
    Posts
    56

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Grrr View Post
    One of the first associations I did was from this code from Tharwat,
    pointing out this fragment from his code:
    Code:
    (progn
      (vla-put-attachmentpoint mt acmiddlecenter)
      (vla-move mt (vla-get-insertionpoint mt) p)
    )
    Later I was doing such stuff in my codes aswell, but I'll always remember that thread he helped me.
    Code:
    (DEFUN C:mJ ()
    (progn
      (vla-put-attachmentpoint mt acmiddlecenter)
      (vla-move mt (vla-get-insertionpoint mt) p)
    )
     (princ)
     )
    Thank you for trying but it doesn't look like that one worked.

Similar Threads

  1. Dynamic Block - Rotating Attribute from Left Justified to Center Justified
    By dyanner in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 18th Nov 2013, 09:09 pm
  2. Make it stop! autosaving in the middle of a command
    By MikeP in forum AutoCAD General
    Replies: 20
    Last Post: 25th Oct 2011, 12:40 pm
  3. Looking for a lisp to make the text in block unmirror
    By ichlove in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 10th Nov 2009, 11:35 am
  4. Need lisp to Align text to middle center of a box/rectangle?
    By Ste1978 in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 21st Nov 2007, 03:56 pm
  5. Right justified quick leader text
    By Siberian in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 3rd Jul 2006, 05:11 pm

Tags for this Thread

Bookmarks

Posting Permissions

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