Wow, that is a lot of code Lee. It will take me a while to go through that and get what I need.
In the meanwhile the script writer that I have is writing the script, the problem is that when it is run it get through the first file, but will not save it or close it, I am guessing there is something wrong in the script, here is the output from the script:
open "H:\BEI-Temp\ROOF PLAN KEYNOTES.dwg" (load rt.lsp) (RT_BSR) qsave close
open "H:\BEI-Temp\SITE PLAN -DEMO KEYNOTES.dwg" (load rt.lsp) (RT_BSR) qsave close
open "H:\BEI-Temp\SITE PLAN -REMODEL KEYNOTES.dwg" (load rt.lsp) (RT_BSR) qsave close
Ok, I just tested both and it appears to work if I don't rum my lisp routine, which is as follows:
(defun RT_BSR (/)
(vl-init2)
(setvar "tilemode" 1)
(DelAllLayouts)
(command "._-layer" "_unlock" "*" "_on" "*" "_freeze" "*" "")
(cond
((= (getvar "pstylemode") 1)
(command "._convertpstyles" "conversion.stb")
)
)
(command "._-insert" "H:\\0ACAD Support\\AutoCAD\\Support Files\\Plot Styles\\shaded.dwg" nil)
(command "._-layer" "_thaw" "*" "_color" "8" "*" "_pstyle" "SHADED" "*" "")
(setvar "setbylayermode" 113)
(command "._setbylayer" "all" "" "_yes" "_yes")
(RT_Lay0)
(princ)
)
Supporting Functions are:
(defun RT_Lay0 ( / i ss e el d e f )
(if (setq i -1 ss (ssget "_X" '((8 . "0"))))
(while (setq e (ssname ss (setq i (1+ i)))) (setq el (entget e))
(setq d (cond ( (cdr (assoc 2 el)) ) ("Misc"))
e (cond ( (cdr (assoc 0 el)) ) ("MiscTyp"))
f (cond ( (cdr (assoc 5 el)) ) ("MiscOb"))
)
(entmod (subst (cons 8 (vl-string-translate ":;*?,<>/\\|." "$$$$$$$$$$$" (strcat "WAS0 - " d "-" e "-" f))) (assoc 8 el) el))
)
)
(princ)
)
(defun DelAllLayouts (/ Layout TabName)
(vlax-for Layout
(vla-get-Layouts
(vla-get-activedocument (vlax-get-acad-object))
)
(if
(/= (setq TabName (strcase (vla-get-name layout))) "MODEL")
(vla-delete layout)
)
)
)
(defun VL-Init2 (/)
(vl-load-com)
(setq *ACAD_DOC* (vla-get-ActiveDocument (vlax-get-acad-object))
*ACAD_LAYERS* (vla-get-layers *ACAD_DOC*)
)
)
Any ideas what in this would cause the script to stop?