Removed some binding parts
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -20,25 +20,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
|
||||
@@ -48,16 +50,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.")
|
||||
;; )
|
||||
)
|
||||
|
||||
;; Unique - Lee Mac
|
||||
|
||||
Reference in New Issue
Block a user