Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to execute and exit VLISP in lisp code?

4 REPLIES 4
Reply
Message 1 of 5
aqdam1978
1331 Views, 4 Replies

How to execute and exit VLISP in lisp code?

Hi,

 

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]

 

Thanks,

 

4 REPLIES 4
Message 2 of 5
mkweaver
in reply to: aqdam1978

(C:vlide) will start the editor but I don't know of any way to close the editor using lisp.

 

 

Mike Weaver

Message 3 of 5
ales.stanek
in reply to: aqdam1978

Hi,

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.

 

 

 

Ales Stanek

Message 4 of 5
aqdam1978
in reply to: ales.stanek

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?!

 

Thanks,

 

Abbas

 

Message 5 of 5
ales.stanek
in reply to: aqdam1978

hi,

 

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

 

 

Ales Stanek

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost