pegasus Posted January 28, 2023 Posted January 28, 2023 Hi, I want to explode the text and mtexts written in a certain layer and make a line. The txtexp command both has to make a selection and pulls it to the current layer. Is there any solution about this? Thank you from now. Quote
mhupp Posted January 28, 2023 Posted January 28, 2023 You also might want to join the lines after the explostion. if your going use the new geometry somehow. Quote
pegasus Posted January 28, 2023 Author Posted January 28, 2023 7 minutes ago, BIGAL said: Post a image or better yet a dwg. here is an mtext. With the autocad txtexp command, this text takes the properties of whatever layer exists at that moment. I also wrote the texts I want to line in a single layer and I want to select the text, text in that layer. 0.dwg Quote
mhupp Posted January 28, 2023 Posted January 28, 2023 (edited) ;;----------------------------------------------------------------------------;; ;; EXPLODES TEXT AND MOVES TO CURRENT LAYER (defun C:FOO (/ SS SS1 LastEnt lay) (vl-load-com) (setq ss1 (ssadd)) (if (setq SS (ssget)) (progn (setq LastEnt (entlast)) (command "_.Txtexp" SS "") (while (setq LastEnt (entnext LastEnt)) (ssadd LastEnt SS1) ) ) ) (if (> (sslength SS1) 0) (progn (command "_.CHPROP" SS1 "" "_LA" (getvar 'clayer) "") ) ) (princ) ) Edited January 28, 2023 by mhupp Quote
pegasus Posted January 28, 2023 Author Posted January 28, 2023 14 minutes ago, mhupp said: ;;----------------------------------------------------------------------------;; ;; EXPLODES TEXT AND MOVES TO CURRENT LAYER (defun C:FOO (/ SS SS1 LastEnt lay) (vl-load-com) (setq ss1 (ssadd)) (if (setq SS (ssget)) (progn (setq LastEnt (entlast)) (vl-cmdf "_.Txtexp" SS "") (while (setq LastEnt (entnext LastEnt)) (ssadd LastEnt SS1) ) ) ) (if (> (sslength SS1) 0) (progn (command "_.CHPROP" SS1 "" "_LA" (getvar 'clayer) "") ) ) (princ) ) sorry, didn't work but there is TXTEXP command in Autocad. how does it not detect Select objects: _.Txtexp Unknown command "TXTEXP". Press F1 for help. Command: <Selection set: 639> Quote
mhupp Posted January 28, 2023 Posted January 28, 2023 (edited) Changed out vl-cmdf to command that might help. Edited January 28, 2023 by mhupp Quote
devitg Posted January 28, 2023 Posted January 28, 2023 (edited) I do not why , fom lisp I get this But from command line TXTEXP. work as expected neither with Edited January 28, 2023 by devitg add vl-cmdf 1 Quote
pegasus Posted January 28, 2023 Author Posted January 28, 2023 13 minutes ago, devitg said: I do not why , fom lisp I get this But from command line TXTEXP. work as expected neither with I get the same result with add vl-cmdf . what could be the reason Quote
mhupp Posted January 29, 2023 Posted January 29, 2023 You updated to? (command "_.Txtexp" SS "") Quote
pegasus Posted January 29, 2023 Author Posted January 29, 2023 20 hours ago, mhupp said: You updated to? (command "_.Txtexp" SS "") EXPLODES TEXT AND MOVES TO OWN LAYER Quote
BIGAL Posted January 29, 2023 Posted January 29, 2023 Best answer is download "Text 2 geom by Seant", he lingers here at times. He should advise you of correct download link. This will do True Type Fonts as well. Quote
pegasus Posted February 3, 2023 Author Posted February 3, 2023 maybe when the text and mtexts are lines, I should be in that layer with the command and all the selected text,mtexts in the layer I specified should return to the line. But of course it throws an error. where did i go astray? (defun c:fin ( / ss i e) (setq (ssget 'CLayer (layerName "LAYER1"))) (and (if (setq ss (ssget "_X" '((0 . "TEXT,MTEXT")))) (and (wcmatch (vla-get-objectname mdl) "AcDbMText,AcDbText") (wcmatch (strcase (vla-get-layer mdl)) "LAYER1")) ) ) (repeat (setq i (sslength ss)) (setq e (ssname ss (setq i (1- i)))) (command-s "_.Zoom" "Object" e "") (sssetfirst nil (ssadd e))(C:TXTEXP) ) ) Quote
tombu Posted February 3, 2023 Posted February 3, 2023 Honestly have no idea what you're trying to do but the quickest and easiest way to create a linetype with text is using ronjonp's "Make Linetype With Embedded Characters": https://www.theswamp.org/index.php?topic=47058.msg520876#msg520876 Quote
pegasus Posted February 3, 2023 Author Posted February 3, 2023 1 hour ago, tombu said: Honestly have no idea what you're trying to do but the quickest and easiest way to create a linetype with text is using ronjonp's "Make Linetype With Embedded Characters": https://www.theswamp.org/index.php?topic=47058.msg520876#msg520876 no actually it is not. I want text and mtexts written in a certain layer to make the selection txtexp. The lines formed should carry the properties of the previous layer, not the current one. Quote
Tsuky Posted February 4, 2023 Posted February 4, 2023 Try with this (defun c:my_txtexp ( / ss n ent dxf_ent lay sel lastent next lastent e dxf_e) (setq ss (ssget ":L" '((0 . "*TEXT")))) (cond (ss (if (not c:txtexp) (load "txtexp")) (repeat (setq n (sslength ss)) (ssadd) (setq ent (ssname ss (setq n (1- n))) dxf_ent (entget ent) lay (cdr (assoc 8 dxf_ent)) sel (ssadd ent) lastent (entlast) ) (sssetfirst nil sel) (c:txtexp) (if (and lastent (entget lastent)) (progn (setq sel nil sel (ssadd) ) (while (setq next (entnext lastent)) (ssadd next sel) (setq lastent next) sel ) ) ) (if sel (repeat (setq i (sslength sel)) (setq e (ssname sel (setq i (1- i))) dxf_e (entget e) dxf_e (subst (cons 8 lay) (assoc 8 dxf_e) dxf_e) dxf_e (subst (cons 62 256) (assoc 62 dxf_e) dxf_e) ) (entmod dxf_e) ) ) ) ) ) (prin1) ) 1 Quote
pegasus Posted February 5, 2023 Author Posted February 5, 2023 really thank you for your help @Tsuky. Even in this state, it is very useful to select the text and mtexts in the layer I want with select similar and run this command. 16 hours ago, Tsuky said: Try with this (defun c:my_txtexp ( / ss n ent dxf_ent lay sel lastent next lastent e dxf_e) (setq ss (ssget ":L" '((0 . "*TEXT")))) (cond (ss (if (not c:txtexp) (load "txtexp")) (repeat (setq n (sslength ss)) (ssadd) (setq ent (ssname ss (setq n (1- n))) dxf_ent (entget ent) lay (cdr (assoc 8 dxf_ent)) sel (ssadd ent) lastent (entlast) ) (sssetfirst nil sel) (c:txtexp) (if (and lastent (entget lastent)) (progn (setq sel nil sel (ssadd) ) (while (setq next (entnext lastent)) (ssadd next sel) (setq lastent next) sel ) ) ) (if sel (repeat (setq i (sslength sel)) (setq e (ssname sel (setq i (1- i))) dxf_e (entget e) dxf_e (subst (cons 8 lay) (assoc 8 dxf_e) dxf_e) dxf_e (subst (cons 62 256) (assoc 62 dxf_e) dxf_e) ) (entmod dxf_e) ) ) ) ) ) (prin1) ) Quote
tombu Posted February 5, 2023 Posted February 5, 2023 On 1/29/2023 at 6:28 PM, BIGAL said: Best answer is download "Text 2 geom by Seant", he lingers here at times. He should advise you of correct download link. This will do True Type Fonts as well. It doesn't work with newer windows and newer Autocad so it was deleted. https://forums.autodesk.com/t5/autocad-forum/text-to-graphics-vector/m-p/9147387#M1000252 Quote
BIGAL Posted February 6, 2023 Posted February 6, 2023 (edited) tombu trying to find latest version. I have something. Text 2 geom.zip Edited February 6, 2023 by BIGAL Quote
thetechgeekko Posted October 3 Posted October 3 (edited) On 2/5/2023 at 10:40 PM, BIGAL said: tombu trying to find latest version. I have something. Text 2 geom.zip 99.75 kB · 20 downloads How to use this , I selected the text and run the command but it shows this. Edited October 3 by thetechgeekko 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.