Message 1 of 5

Not applicable
10-29-2015
05:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have got a drawing that has got about 500 blocks in it and i need to wblock them out one by one
They have all got text above them that gives the name that i want to use for the block name then i just need to select the objects and the insersion point of the block
I have found a lisp on the fourms that seems to work for other people but it doesnt seem to work for me it asks me to select the block name text i select it and then it doesnt do anything else
(defun c:qwblock (/ DIR ENTXT SS TXT PT TXT0) (setq Dir (getvar "DWGPREFIX")) (vl-cmdf "_undo" "be") (while (AND (vl-file-directory-p Dir) (setq enTxt (car(entsel "\nSelect Block name Text: "))) (eq (cdr (assoc 0 (entget enTxt))) "TEXT") (setq txt0 (cdr (assoc 1 (entget enTxt)))) (not (findfile (setq txt (strcat Dir txt0)))) (setq pt (getpoint "\nPick Insertion Point: ")) (setq ss (ssget)) ) (progn (vl-cmdf "_undo" "mark") (vl-cmdf "_move" ss "" pt "0,0,0") (vl-cmdf "_zoom" "object" "p" "") (vl-cmdf "_-wblock" txt "" pt ss "") (vl-cmdf "_undo" "back") ) ) (vl-cmdf "_undo" "end") (princ) )
Would anyone be able to help me to get this to work ?
Tia
Solved! Go to Solution.