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

Running VB Script from Lisp

2 REPLIES 2
Reply
Message 1 of 3
chris.kitzmann
1438 Views, 2 Replies

Running VB Script from Lisp

I am trying to manage my support paths, this includes printer support paths, with a VB Script file.  Is there anyway to get this .vbs file to run from within my acad.lsp file?  I have attached both my script files and my lisp file for reference.

 

I would think that this could be done but all I can seem to find is how to run VBA code in lisp.  I just need to make a call and have the file run silently.  Any help with this would be greatly apreciated.

 

Thank you,

Chris Kitzmann

.: Chris Kitzmann :.
2 REPLIES 2
Message 2 of 3
jayg28
in reply to: chris.kitzmann

You could use the acet-sys-spawn function to spawn an external process.

 

This example launches notepad from Autolisp.

 

(acet-sys-spawn 0 "notepad.exe")

 

To run a VBS you will have to experiment with the windows START command or by calling CMD.exe

 

 

Message 3 of 3
l3insight
in reply to: jayg28

Both of these work from the command line when you have autocad open. Both of them fail to launch the script.vbs file when you attempt to start them in a .scr file using the /b switch on the acad.exe command line. 1. start wscript c:/script.vbs 2. start cmd /c c:/script.vbs It's not that AutoCAD doesn't read the script file. It does. But in the command line you see the following and the script does not execute. If you copy and paste the line that's in the .scr file to the AutoCAD command line, the vbs script execute!!! It seems like autocad doesn't want to start a vbscript from the command line. It cancels it. Help! Command: Start Application to start: cmd /c "C:\script.vbs"*Cancel* cmd /c "C:\script.vbs" Command: COMMANDLINE Command: start Application to start: "C:\script.vbs"

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

Post to forums  

Autodesk Design & Make Report

”Boost