@Design wrote:
Hello. I realize this post is years old but I wanted to try anyway. Is there a way to save this command in AutoCAD?
You don't actually specify which of the two commands [@Patchy instructs about one of them], but I also have some further elaboration.
You can put both command definitions in the same file if you want both. And whether or not you do, you can give such a file any name you want [it doesn't need to be the same as the command name], as long as the filetype ending in .lsp. You can use a more descriptive name, so you can tell what it's about when looking at a list of files, such as maybe Break1pt.lsp.
But my preferred way, which doesn't use a file named for the command(s), but will have it/them loaded in all drawings automatically, is using the acaddoc.lsp file. If you don't know whether you already have one, type in:
(findfile "acaddoc.lsp")
If that returns the file name with a file path, open that file in a plain-text editor such as Notepad, paste the code for the command(s) in at the end, and save the file. If the search returns nil, paste the code into Notepad and save it to that file name, preferably in a folder similar to this:
C:\Users\username\AppData\Roaming\Autodesk\AutoCAD 20xx\Rversion\language\support
THEN those command definitions will be loaded automatically into every drawing you start or open. You don't need to restart AutoCAD as you would with entries in the Startup Suite, though if you want to use the command(s) in any drawing you already have open at the time, you would need to either close and re-open the drawing, or use APPLOAD to navigate to and load that acaddoc.lsp file.
You will find other things to put into that file, to have them loaded in every drawing.
[Things that are put in the Startup Suite "briefcase" in APPLOAD, according to the description of that at least, are run when AutoCAD is first started up (hence the name, and the reason you need to restart when you add something to it), but not again in every drawing opened. That may not really be true -- it seems at least some things that are individual-drawing-specific may get into all drawings from there, but I'm wary of counting on that, not knowing what determines which ones will behave that way.]
Kent Cooper, AIA