changed to lsp, xref question, filename test
This commit is contained in:
@@ -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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user