LISP to remove file read only status if present
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the following lisp routine that creates a PDF. This lisp is also used in a script file used by AutoScript to batch PDF large amounts of drawing files. The problem is since our drawings are stored in Vault you have to remember to check out the drawings or through Windows Explorer remove the file read only attribute before AutoScript can do the batch process. Is there code that can be added to lisp below that can check for the read only status and if present remove it and then set it back after the file has been processed?
;(defun c:BPDF nil
(if (= 0 (getvar 'pstylemode))
(vl-cmdf "_.Convertpstyles")
)
(command "tilemode" "0")
(command "-plot" "Yes" "" "DWG To PDF.pc3" "ANSI expand B (11.00 x 17.00 Inches)" "Inches"
"Landscape" "No" "Extents" "Fit" "Center" "Yes" "KCI-monochrome.ctb" "No" "No" "Yes" "No"
(strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) ".pdf") "No" "Yes")
(princ)
; )