I need to run VLISP / (_VLIDE) in my lisp code.
how can I run _VLIDE inside of my lisp code and also how can close VLISP by lisp code?
[VLISP=_VLIDE=Visual Lisp Editor]
if you want to run vlide in code and it isn't last operation. Use syntax (C:vlide T). The command start vlide and get back control to original program. I use it for automatic build fas files.
YES, exactly I want to uses in my code that I prepare to BATCH FAS MAKER!!!
my code is:
(defun c:FAS_Maker (/ path files itm des) (defun ReplaceStr (NewStr Patt Str / pos) (setq pos 0) (While (setq pos (vl-string-search patt str pos)) (setq Str (vl-string-subst NewStr patt Str pos)) (setq pos (+ pos (strlen NewStr))) ) str ) (setq path "C:\\LISP\\") (setq files (vl-directory-files path "*.LSP" 1)) (if (> (length files) 0) (progn (setq des (open (strcat path "t.scr") "w" )) (foreach itm files (write-line (strcat "(vlisp-compile 'st \"" (ReplaceStr "\\\\" "\\" path) itm "\")") des) );;foreach (write-line "(alert \"All files compiled...\")" des) (close des) (C:VLIDE T) (command "script" (strcat path "t.scr")) ;;(close "VLIDE");; (princ) );;progn (alert "Error!:\n\nThere is no any \"*.LSP\" files in \"C:\\LISP\\\" folder!\n\nPlease copy your *.LSP files to this folder and try again!") );;if );;defun
Just copy your LSP files to C:\LISP\ folder and run the code!
BUT!, I can't close VLISP via lisp code!
does anybody knows that how can I close VLIDE?!
I use a litle diferent approach.
I create bat file that run autocad with scr file. (The bat file I start manualy but is possible make this as "night build" by windows scheduler or run this bat file by innosetup for example.)
scr file load and run lisp file.
by vl-catch-all-apply i manage proces of creating fas files for each lsp file
and at the end i quit AutoCAD
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.