Jump to content

align insertion points of text


NoelStalker

Recommended Posts

Is there any automated way of aligning the insertion points of text? I once worked at a company that had a command that allowed you to select one string of text and then select multiple strings of text and make them aligned to the first string of text.

Link to comment
Share on other sites

You could use Experess tools' Txt2mtxt, or give this a try...

(defun c:test (/ ss1 sslen newxpt cnt ent ed old72 new72 old10 new10 oldxpt)
(setq ss1 (ssget '((0 . "*text")))
   sslen (sslength ss1)
   newxpt (car (getpoint "\nSelect point for alignment: "))
   cnt 0
   )
 (repeat sslen
   (setq ent (ssname ss1 cnt)
     ed (entget ent)
     old72 (assoc 72 ed)
     new72 (cons 72 0)
     ed (subst new72 old72 ed)
     old10 (assoc 10 ed)
     oldxpt (cadr old10)
     new10 (subst newxpt oldxpt old10)
     ed (subst new10 old10 ed)
      );setq
     (entmod ed)
   (setq cnt (1+ cnt))
   );repeat
   (princ)
 );defun

Link to comment
Share on other sites

What do you mean by "aligne"? You can select some texts and in the properties window set their insertion point to have the same X value -this will align them horisontally, without to affect their vertical position.

Link to comment
Share on other sites

Our company has those commands; neat X and neat Y they are called. You choose one item of mtext and it then matches the ones you select after to have either the same X or Y coordinate.

 

Unfortunately, I am not able to post this routine.

Link to comment
Share on other sites

  • 3 weeks later...

lpseifert,

I was not aware of txt2mtxt. Thanks! Also, your lisp routine works wonderfully. Thank you very much and have a great day.

 

Sincerely,

Noel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...