View Full Version : Notepad Tip (= AutoCAD as your Desktop!)
r.grandmaison
2006-05-05, 03:30 AM
If you use NOTEPAD a lot, why not add it (or any Windows application!) to start while you're within AutoCAD?
Create a custom button and use the following bit of macro, modified to use whatever *.exe your favorite application uses as its Target app:
^C^Cshell;notepad;
Clever users might even use the Notepad icon found in notepad.exe...
Cheers,
Robert
Mike.Perry
2006-05-05, 07:15 AM
An alternative approach...
Add something like the below to your Acad.pgp file:
NOTEPAD, START NOTEPAD, 0 ,Reload Acad.pgp ( _.ReInit ), you now have a command called NotePad that can be run from the AutoCAD command line.
:beer: Mike
zoomharis
2006-05-05, 09:26 AM
In my system, NOTEPAD works even without setting it up in the pgp file. Does that mean Notepad is the default editor for AutoCAD?. (Does any provision there at the end of AutoCAD setup for setting up the default editor...? Don't remember properly....)
har!s
Mike.Perry
2006-05-05, 09:31 AM
In my system, NOTEPAD works even without setting it up in the pgp file. Does that mean Notepad is the default editor for AutoCAD?. (Does any provision there at the end of AutoCAD setup for setting up the default editor...? Don't remember properly....)Hi
I have just taken a look inside the shipped version of Acad.pgp ( take a look at your shipped version ), NotePad is defined in there.
Therefore if you are using the shipped version, you will already have access to NotePad at the AutoCAD command line.
Have a good one, Mike
zoomharis
2006-05-05, 09:41 AM
Hi
I have just taken a look inside the shipped version of Acad.pgp ( take a look at your shipped version ), NotePad is defined in there.
Therefore if you are using the shipped version, you will already have access to NotePad at the AutoCAD command line.
Have a good one, Mike
Hi mike,
A search for "*.pgp" in my "C: drive" (where AutoCAD 2004 has been installed) returned nothing. Do I need Express tools to be installed for getting Acad.pgp automatically...?
:confused:
har!s
Mike.Perry
2006-05-05, 09:49 AM
A search for "*.pgp" in my "C: drive" (where AutoCAD 2004 has been installed) returned nothing. Do I need Express tools to be installed for getting Acad.pgp automatically...?Hi
Try the below snippet of LISP code at the AutoCAD command line...
Command: (findfile "Acad.pgp")Nope! Acad.pgp has no association with Express Tools. A standard Acad.pgp ships with AutoCAD ( nothing to do with Express Tools ).
Have a good one, Mike
rkmcswain
2006-05-05, 12:40 PM
Here is another tip:
Add this lisp to your MNL file
(defun notepad_edit ( / tmp tmp2)
(setq tmp (getstring T "\n Enter File Name: "))
(startapp "notepad" (setq tmp2 (findfile tmp)))
(princ "\n")
(princ tmp2)
(princ " ")
(princ)
)
Then create a toolbar button with this macro:
^c^c(notepad_edit);
Then when you click the button, you can enter any text file in your support file search path (such as "acad.pgp", "acad.lsp", "acaddoc.lsp", etc) and it will open in Notepad. You will also be editing the copy of the file that AutoCAD is reading.
zoomharis
2006-05-05, 01:42 PM
Hi
Try the below snippet of LISP code at the AutoCAD command line...
Command: (findfile "Acad.pgp")
Have a good one, Mike
FINDFILE returned the exact location of the acad.pgp file. Actually the problem was with my search. It was kept in a hidden folder and I forgot to check the 'Search hidden files and folders' option in the windows search. Sorry for the trouble and thanks for the help.
Another way of starting a windows application while working on AutoCAD (or any other windows application) is to use 'Windows Key + R' to invoke the run prompt and type application name over there. I usually use this method to invoke windows calculator application. Almost same like using the Shell command (Type 'Shell' then 'Calc')
har!s
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.