- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day!
I have the following routine set up to use txt2mtext and then manually select the new MTEXT entity. This routine works, but I want the finished MTEXT entity to automatically be added the "textObject" selection set. I am attempting to use entlast to add the entity to a selection set.
Here is what I've come up with, but of course, the commented lines are me trying to figure this out. Also, this is all a part of a larger routine that requires the selection set variable "textObject" to contain the MTEXT entity to complete successfully.
---
(if (= (cdr (assoc 0 (entget (ssname textObject 0)))) "TEXT")
(progn
(setq textObject nil)
(princ "\n\033\n <> Select TEXT objects to convert to MTEXT <> ")
(command "txt2mtxt" (ssget) "")
;(setq textName (handent (entlast)))
;(setq textObject (ssadd (handent textName))
(princ "\n\033\n <> Select the MTEXT object <> ")
;(setq textName (vla-get-objectid (vlax-ename->vla-object (entlast))))
;(setq textName (entlast))
;(princ textName) (terpri)
;(setq textObject (ssadd (handent textName)))
;(princ (handent textName))
(setq textObject (ssget ":S"))
) ;progn
) ;if
Solved! Go to Solution.