1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
;OPEN explorer in the quotation or project directory
(defun c:quotation( / baseDir quotationNr ProjectName tempDir directoryToGo foundOne)
(setq quotationNr(strcase(strcat(getstring "\nQuotation nr ..") "*" )))
(setq QuotationOrProject (substr quotationNr 1 1)
findOne nil
)
(cond
((= QuotationOrProject "Q")(setq baseDir "K:\\Quotations"))
((= QuotationOrProject "O")(setq baseDir "K:\\projects"))
(T (setq baseDir "G:\\Archive_STS\\Archive\\P&A Projects"))
)
(setq ProjectName(vl-directory-files baseDir))
(setq ProjectName (cddr projectName))
(foreach PN ProjectName
(setq ProjectNr (strcat baseDir "\\" PN))
(setq tempDir(vl-directory-files ProjectNr quotationNr))
(if tempDIr
(progn
(setq directoryToGo (strcat baseDir "\\" PN "\\" (car tempDir))
foundOne T
)
(startapp "explorer" (strcat "/e, " (chr 34) directoryToGo (chr 34)))
)
)
)
(if (not foundOne)(alert "Only Quotation,Project or archives.."))
(princ)
) |
Partager