Removed some binding parts

This commit is contained in:
2020-02-06 00:47:18 +01:00
parent edb7a19296
commit 878f127bce
2 changed files with 48 additions and 40 deletions

View File

@@ -31,25 +31,27 @@
(setq blklist (LM:Unique blklist))
;; Create a list of found xrefs
(setq i 0);counter to zero
(setq imax 1);while variable
(while imax
;; Removed this part, because it fails if the xrefs name differs from the filename:
;; (setq i 0);counter to zero
;; (setq imax 1);while variable
;; (while imax
(setq xrefpath (findfile (strcat (nth i blklist) ".dwg")))
(if xrefpath
(progn
(setq xreflist (append xreflist (list (nth i blklist))))
(princ (strcat "Xref found: " (nth i blklist) ".dwg\n"))
)
)
;; (setq xrefpath (findfile (strcat (nth i blklist))))
;; (if xrefpath
;; (progn
;; (setq xreflist (append xreflist (list (nth i blklist))))
;; (princ (strcat "Xref found: " (nth i blklist) ".dwg\n"))
;; )
;; )
(setq i (1+ i));increments i
(if (= i (length blklist)) (setq imax nil));finish function if i equals il
)
;; (setq i (1+ i));increments i
;; (if (= i (length blklist)) (setq imax nil));finish function if i equals il
;; )
;; Show prompt only if there are xrefs in the file:
(if xreflist
(progn
;; (if xreflist
;; (progn
(initget 1 "Yes No")
(setq really (getkword "Bind xrefs? [Yes/No]"))
(if
@@ -59,16 +61,18 @@
(setq imax 1);while variable
(while imax
(command "_.-xref" "_bind" (nth i xreflist))
;; (command "_.-xref" "_bind" (nth i xreflist))
(command "_.-xref" "_bind" (nth i blklist))
(setq i (1+ i));increments i
(if (= i (length xreflist)) (setq imax nil));finish function if i equals il
;; (if (= i (length xreflist)) (setq imax nil));finish function if i equals il
(if (= i (length blklist)) (setq imax nil));finish function if i equals il
)
)
)
)
(princ "No xref found in model space.")
)
;; )
;; (princ "No xref found in model space.")
;; )
)
(defun LM:Unique ( l )