;;
;; Needs echo off
;; need to test with nested xrefs
;;
;; By: Orig concept Eric H 03-31-06
;; John Kaul 04-03-06
(defun StringStrip
-End
( Str Char
) ;; Strip the end of a string off.
;; e.g. (StringStrip-End "This is a test" "i")
;; -> "This "
(defun ListStriper
( lst dec
) (ListStriper
(cdr lst
) dec
)) ) ;; if neither the str or char are present, return an empty str
""
(vl-List->String
(defun strParse
(aStr delim
/ strList pos
) aStr
(substr aStr
(+ pos
2))))
( (lambda (/ entry xname xpath saved
-xref
-name
) ;; itterate thru all xrefs in dwg
;; get the first block
;; check to see if it has a path
;;
;; if it does...
;; get the name saved in database
;; get the drawing name saved for name in database
xpath
(strcat "..\\B\\" xname
) ) ;; set a reletive path based upon company standards.
;; try to find the drawing with the reletive path
;;
;; if found... then load it
(command "-xref" "path" saved
-xref
-name xpath
)
;; Try to make it reletive based on working drawing path.
;;
;; NOTE: This is not `correct', but I cant think of
;; another way right now.
;; If all else fails, check to see if the saved
;; path is the same as the current drawing path...
;; Lets hope this is the place for the drawing
) ; if
) ; if
) ; progn
) ; if
) ; while
)
)
)