This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; extract-bound-xrefs.lsp | |
;;; Extracts names of former external references that have been bound as blocks | |
;;; Works on single or multiple DWG files | |
(defun C:EXBX (/ blocks block-name xref-names) | |
"Extract Bound Xrefs - Single file version" | |
(princ "\n--- Extracting Bound Xref Names ---\n") | |
(setq xref-names (get-bound-xref-names)) | |
(if xref-names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; AutoCAD LISP function to replace blocks with same name | |
;; Usage for CLI: (REPLACEBLOCK-CLI "BLOCKNAME" "C:\\Path\\To\\Block.dwg") | |
;; Usage interactive: REPLACEBLOCK | |
(defun REPLACEBLOCK-CLI (blockName blockPath / oldBlockName newBlockPath blockExists ss i n ent entData insPoint xScale yScale zScale rotation layer oldInsunits oldInsunitsdefsource oldInsunitsdeftarget oldAttreq oldFiledia oldCmdecho instanceList) | |
(setq oldBlockName blockName) | |
(setq newBlockPath blockPath) | |
(if (and oldBlockName newBlockPath (/= oldBlockName "") (/= newBlockPath "")) | |
(progn |