
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The fourth line- Need to use the Mtext that is in my selection set, ss1, rather than prompt the user. This program is a snippet of one that will delete an existing Mtext and insert a new Mtext using a notepad file(already have that figured out). I think the selection set needs to be converted to a list that VLA can understand. I've tried modifying some examples with no luck. The circle is just for me to verify that the program is extracting the insertion point.
(defun c:ptTest (/ ss1 mtext mobj base)
(setq ss1 (ssget "_C" '(86 342) '(-11 303) '((0 . "mtext"))))
(vl-load-com)
(setq mtext (car (entsel "\Select mtext:")))
(setq mobj (vlax-ename->vla-object mtext))
(setq base (vlax-safearray->list (vlax-variant-value (vlax-get-property mobj 'insertionpoint))))
(command "circle" base "2")
)
Solved! Go to Solution.