- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all!
i'm super new to autolisp. I take parts here and there on the web and edit it for my purposes.
I want to copy a text, snap to insertion point automatically then click where I want it to go, then enter edit mode.
Here's what I came with:
(defun c:ct3 (/ IncVal TextObj NewPos TextVal NewTextObj)
(vl-load-com)
(setq TextObj
(vlax-ename->vla-object (car (entsel "\nSelect Mtext Object :")))
)
(while
(setq NewPos (getpoint "\nSelect new position : "))
(setq TextVal (atoi (vla-get-textstring TextObj)))
(setq NewTextObj (vla-copy TextObj))
(vla-move NewTextObj
(vla-get-InsertionPoint NewTextObj)
(vlax-3D-Point NewPos)
)
(vla-put-textstring NewTextObj (command "_TEXTEDIT" (entlast) ""))
(setq TextObj NewTextObj)
)
(princ)
)
It works, but it gives me an error about ActiveX, and a non optional parameter.
Also, it would be nice that when I edit the text and press enter, the funtion would
start again so that I can copy/edit another text.
Thanks to anyone who can help!
Solved! Go to Solution.