DAREESALEX Posted September 4, 2018 Posted September 4, 2018 Hello, This is my very first post here. I was wondering if I get some ideas\help to complete my project. In the attachment you will find closed polygons with labels inside of it. My work here is I have to tag the labels with the polygon. And these labels has to be divided into two sets, For example in the attachment you will fond the labels like the same in the below, 083S 016 I wanted make above labels in two different rows, I mean 083S in the first row and 016 in the second row(just wanted to separate) . testing.dwg Quote
JuniorNogueira Posted September 4, 2018 Posted September 4, 2018 (edited) Use lisp to convert to mtext, and then change the width in the properties. (defun C:Demo (/ ss i elist) (setq ss (ssget "_X" (list (cons 0 "TEXT")))) (setq i -1) (if ss (repeat (sslength ss) (setq elist (cdr (assoc -1 (entget (ssname ss (setq i (1+ i))))))) (command "TXT2MTXT" elist ""); Express Tools command );repeat );if ) Edited September 4, 2018 by JuniorNogueira Quote
marko_ribar Posted September 4, 2018 Posted September 4, 2018 This : (setq elist (cdr (assoc -1 (entget (ssname ss (setq i (1+ i))))))) Is equal to : (setq elist (ssname ss (setq i (1+ i)))) 1 Quote
BIGAL Posted September 5, 2018 Posted September 5, 2018 A bettter way is that mtext supports newline so if its 1 text line "083S 016" then use a look for space split into two and join back with a \\P from memory "083S\n016" your string TextString = "083S 001\\P(DEFFERED)" This is the answer but I have to go right now someone else will jump in very easy. copy 1st line to command line then second pick your mtext. (setq obj (vlax-ename->vla-object (car (entsel "pick object")))) (vla-put-textstring obj "083S\\P001\\P(DEFFERED)") Quote
Recommended Posts
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.