changed to lsp, xref question, filename test

This commit is contained in:
2019-09-30 23:49:39 +02:00
parent 135008b4c4
commit 9a8bdeb939
5 changed files with 280 additions and 197 deletions

View File

@@ -5,16 +5,20 @@
;; Created by Peter Gyetvai
;; gyetpet@mailbox.org
(defun C:bindAndDetachXrefs (/ blk)
(defun C:bindAndDetachXrefs (/ really blk)
(graphscr)
(foreach x
(mapcar 'cadr (ssnamex (ssget "_X" '((0 . "INSERT") (410 . "MODEL")))))
(setq blk (cdr (assoc 2 (entget x))))
(if (assoc 1 (tblsearch "block" blk))
(progn
(command "_.-xref" "_bind" blk)
(command "_.-xref" "_detach" blk)
(initget 1 "Yes No")
(setq really (getkword "Bind xrefs? [Yes/No]"))
(if
(= really "YES")
(foreach x
(mapcar 'cadr (ssnamex (ssget "_X" '((0 . "INSERT") (410 . "MODEL")))))
(setq blk (cdr (assoc 2 (entget x))))
(if (assoc 1 (tblsearch "block" blk))
(progn
(command "_.-xref" "_bind" blk)
(command "_.-xref" "_detach" blk)
)
)
)
)