I wrote this lisp and it has been very handy. input how much offset you want tags to move (i.e. 10,-15) and it moves them for you as you select them. I have been trying to make it take a selection set instead of moving one text at a time. Any ideas?
(defun c:MMT (/ a COUNT) (setq count 0) (setq a (getpoint "\n X,Y OFFSET OR ENTER FOR MANUAL MODE")) (terpri) (princ "\n SELECT TEXT ESC TO EXIT") (if (= nil a) (progn(while (< count 10) (COMMAND "MOVETEXT" pause pause))) (progn(while (< count 10) (COMMAND "MOVETEXT" pause (strcat "@" (rtos (car a)) "," (rtos (cadr a))))))) (princ))
Since you need to make a selection and give it a displacement anyway, couldn't you just do it in an ordinary Move command? It's not clear to me what enhancement a routine would give you compared to that.
If I use the move command it will move the object, where I need to move just the tag/text.
Regards @jwaldronEMNF9
Try this code, moves the selected texts, on the Z axis the elevation value entered
(defun c:mtt (/ s elev i sn textv ptext)
(princ "Select Texts...")
(setq s (ssget '((0 . "*text")))
elev (getreal "\nEnter Elevation Value to Move: ")
)
(repeat (setq i (sslength s))
(setq sn (ssname s (setq i (1- i)))
textv (vlax-ename->vla-object sn)
ptext (vlax-get textv 'insertionpoint)
)
(vla-put-insertionpoint textv
(vlax-3d-point (mapcar '+ ptext (list 0. 0. elev)))
)
)
)
Carlos Calderon G
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
This is why I need this. If it could place tags offset. hopefully every tag would not need to be moved, only half of them.
Are you talking about regular blocks with attributes or about verticals eg. C3D or MAP as this thread is probably about.
I am talking about the auto generated item tags for spool parts or the numbers for hangers.
they are generated on top of the hanger in plan view. Then they all need to be manually moved.