startapp

AutoCad AutoLISP Functions

 
startapp
 
 
 

Starts a Windows application

(startapp appcmd[file]) 

Arguments

appcmd

A string that specifies the application to execute. If appcmd does not include a full path name, startapp searches the directories in the PATH environment variable for the application.

file

A string that specifies the file name to be opened.

Return Values

An integer greater than 0, if successful; otherwise nil.

Examples

The following code starts Windows Notepad and opens the acad.lsp file.

Command: (startapp "notepad" "acad.lsp")

33

If an argument has embedded spaces, it must be surrounded by literal double quotes. For example, to edit the file my stuff.txt with Notepad, use the following syntax:

Command: (startapp "notepad.exe" "\"my stuff.txt\"")

33