Greetings All,
I'm writing a script to move all objects in a drawing and would like to use the insert point of the title block as a base then move it to 0,0. Since the title block is in random areas in different drawings I can't always move from the same point A to point B. The ideal script line would be:
move all ins <blockname> 0,0
however when using an osnap AutoCAD is expecting a user input. The handle appears to be the same in all the drawings so that could be used instead of the block name but AutoCAD won't accept either. Any suggestions?
Solved! Go to Solution.
Solved by pendean. Go to Solution.
You need a lisp file that uses filters to select your block by name then gets its insertion point. Then its a simple matter to move everything from that point to 0,0.
If you tell us what your titleblock's name is some kind soul might even give you a starter lisp.
How about moving the block using the change command? After selecting the block (while you're in the change command) hit enter twice ACAD will ask for the insert point.
@m_hensley, for lisp(script) this is what I'd come up with so far:
move all (setq ss (ssget "X" '((0 . "INSERT") ;FILTER FOR BLOCK NAME (2 . "bsize") (66 . 1)))) (setq i (sslength ss)) ss 0,0
I think I may have butchered it since I started but it's the jist of the thing.