Hi
Attached lisp file only works with dtext objects but I am going to work with Mtext too.
Thanks a lot
Hamid
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
@hamid.akbari wrote:
....
Attached lisp file only works with dtext objects but I am going to work with Mtext too.
....
You should be able to do that by replacing this line:
(setq ss (ssget '((0 . "TEXT"))))
with this:
(setq ss (ssget '((0 . "*TEXT"))))
That's assuming you don't have any RTEXT that you would not want it to process. In case you might, you could use this instead:
(setq ss (ssget '((0 . "TEXT,MTEXT"))))
[And by the way, there is no such thing as a DTEXT object. DTEXT is a command, for the most part identical to the TEXT command for many years (it's a long story), but the objects it makes are just TEXT.]
See the attached file...
UNTESTED
HTH
Henrique
@hamid.akbari wrote:
Thanks but it still dosent work!
I'm a little puzzled as to why it works for Text and not Mtext with the following:
(setq elist (list (cons -1 ent) (cons 1 nstr)))
(entmod elist)
It doesn't seem like it ought to, even for plain Text, since it seems to be making an entire entity data list out of just an entity name and Text content, without any of the other elements [Layer, Style, height, etc.]. But try replacing those lines with the way I would typically expect to see that done:
(setq entd (subst (cons 1 nstr) (assoc 1 entd) entd))
(entmod entd)
which works for me, for both Text and Mtext, in limited testing.
@Kent1Cooper wrote:
@hamid.akbari wrote:
Thanks but it still dosent work!
I'm a little puzzled as to why it works for Text and not Mtext with the following:
(setq elist (list (cons -1 ent) (cons 1 nstr)))
(entmod elist)
Only certain entity types can be modified using this method, usually those which do not require subclass markers (DXF 100) when created with entmake. Here is an incomplete list:
TYPE MODIFIED USING ONLY ENAME?
=====================================
ARC YES
ATTRIB (SINGLE) YES
ATTRIB (MULTI) NO
CIRCLE YES
ELLIPSE NO
HATCH NO
INSERT YES
LINE YES
LWPOLYLINE NO
MTEXT NO
POINT YES
POLYLINE YES
SPLINE NO
TEXT YES
XLINE NO
Hi any one know how to create co-ordinate dimesnion for particular drawing using lisp program or something else. I have tried lisp but i'm getting the co'ordinate value in 5digit like (12345.635) i changed the ucs also but no use same thing only i'm getting. Please if any one know tell me...