Originally Posted by
james.hodson
Wow that was a hard title to name...
I am in need of help. I am looking for a LISP that will look at my drawing, look at a specific block (preferably one I click on) and then searches that drawing for where it has lines or text or something intersecting it, then move it away from that object.
I know I am asking for a pretty complex subroutine. I have attached a sample of what I am looking to do. Please see the rev clouds. I have attribute blocks that intersect walls and other text that I would like a lisp that automatically moves the attributs (lines of text only) that intersects and places them in a new location.
Can someone please help?
James Hodson
PS My office uses AutoCAD 2004/2009, and we save in 2000 format, I figure that might be important to know.
Not sure about it will helps
You can just move attributes by clicking on it
Tested on 2008 only
Code:
(defun C:MATT (/ att att_obj base ent pt)
(while
(setq ent (nentsel "\nSelect attribute (or press Enter to Exit): "))
(setq att (car ent)
base (cadr ent)
att_obj (vlax-ename->vla-object att)
pt (getpoint base "\nSpecify new point: ")
)
(vlax-invoke att_obj 'Move base pt)
)
(princ)
)
(prompt "\n\t\t>>>\tType MATT to move attribute(s)\t<<<")
(prin1)
(vl-load-com)
~'J'~