Search the Community
Showing results for tags 'xref block import'.
So, I have an Xref Block that when I bring in is way smaller than I want it to be. And I want to scale it up to be the exact same scale as the current drawing. How would I go about it?? ---Thanks to ReMark for showing me how to post a thread.... SMH to myself
I have a main drawing that have an xrefs attached, I have three other drawings with the same xrefs. How do I insert the blocks without detaching the xrefs? EXAMPLE Main.dwg [xrefs: 1flpln, 1light] (blocks: room_1, room_2, room_3) Room_1.dwg [xrefs: 1flpln, 1light] Room_2.dwg [xrefs: 1flpln, 1light] Room_3.dwg [xrefs: 1flpln, 1light] The problem is without detaching the xrefs in room 1,2, and 3; all the xrefs are re-attached even though ALL xrefs are overlayed. EXAMPLE Main.dwg [xrefs: 1flpln, 1light] (Blocks: room_1 [xrefs: 1flpln, 1light] room_2 [xrefs: 1flpln, 1light] room_3 [xrefs: 1flpln, 1light]) I'm sorry for the long post just trying to get the point across, blocks with xrefs attached brings multipule unwanted xrefs, need a way to fix without detaching ALL xrefs before hand... Thanks in advance.
I am trying to write a lisp routine that would import blocks from another drawing by attaching the drawing as an xref, xbinding the selected blocks and detaching the xref. When I run the lisp, it says that the drawing file I type in is already attached as xref or has no blocks (both of which are not true). Any idea what's wrong? Below is the code. (tried to wrap code in tags, but no matter how often I highlight the code and hit the tag button it doesn't show. Sorry) (defun C:XIMPORT ( / fname blname toggle nlist index blist) (setq fname (ustr 1 "Enter filename to extract block from" nil nil)) (while (tblnext "block")) (command "xref" "a" fname nil) (tblnext "block") (while (setq blname (tblnext "block")) (setq blist (append (list (dxf 2 blname)) blist)) ) (if blist (progn (textpage) (setq index -1) (while (setq index (1+ index) blname (nth index blist)) (setq toggle (not toggle)) (prompt (strcat (if toggle "\n " "\t\t") (itoa (1+ index)) " " blname) ) );while&prompt (while (setq index (getint "\nEnter block number to import or Enter to exit : " ) ) (setq blname (nth (1- index) blist)) (setq nlist (append (list (nth (1- index) blist)) nlist)) );while (foreach blname nlist (command "xbind" "b" blname)) (command "xref" "d" (progn (textpage) (prompt "\n\nItems listed as Not Detached show assigned names of imported blocks:\n\n") fname ) ) );progn then (prompt (strcat "\n" fname " already attached as xref or has no blocks.")) );if blist (princ) );defun C:XIMPORT