AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN


(getfiled) and (startapp).

Here is a handy little routine that displays a dialogue box that defaults to a user defined directory and allows you to choose a Lisp file to edit. It then opens the file in Window's Notepad. When you have finished editing, it automatically loads the relevant Lisp file.
It uses the (getfiled) function to locate and open the Lisp file, and the (startapp) function to run Notepad.exe. You can change both path specifications to suit your setup.

(defun c:test ( / fl)
	(setq fl 
	   (getfiled "Select a Lisp File"
		     "d:/cadken/cadlisp14/NewLisp/"	
		     "lsp" 0)
	);setq
	(startapp "c:/windows/notepad.exe" fl)		
	(load fl)
	(alert (strcat "\n " fl " Loaded"))
   (princ)
);defun
(princ)
The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website