0 Members and 1 Guest are viewing this topic.
Write Block(s) -Use the BlockWerx write blocks dialog to write any number of blocks in the drawing out to file (into a Library or elsewhere) all at the same time.
(defun c:bwblock (/ ss cntr bn) (setq ss (ssget "x" '((0 . "INSERT"))) cntr 0 ) (mapcar 'setvar '(filedia cmddia) '(0 0)) (if (not (zerop (sslength ss))) (while (setq ent (ssname ss cntr)) (setq bn (cdr (assoc 2 (entget ent))) cntr (1+ cntr) ) ;; wblock each block in the current dwg prefixed with "BLOCK_" ;; and sent to c:\temp which must exist ;(command "_wblock" (strcat "c:\\temp\\BLOCK_" bn) bn "NO"); for Map (command "_wblock" (strcat "c:\\temp\\BLOCK_" bn) bn) ) ) (mapcar 'setvar '(filedia cmddia) '(1 1)) )