Through the Interface: Adding aliases for custom AutoCAD commands

May 2015

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30


« Using F# to simulate hardware behaviour | Main | Mardi Gras, Super Tuesday and F# »

January 31, 2008

Adding aliases for custom AutoCAD commands

I had an interesting question come in by email and thought I'd share it via this post. To summarise the request, the developer needed to allow command aliasing for their custom commands inside AutoCAD. The good news is that there's a standard mechanism that works for both built-in and custom commands: acad.pgp.

acad.pgp is now found in this location on my system:

C:\Documents and Settings\walmslk\Application Data\Autodesk\AutoCAD 2008\R17.1\enu\Support\acad.pgp

We can edit this text file to add our own command aliases at the end:



Here we've simply created an alias for the standard NETLOAD command (a simple enough change, but one that saves me lots of time when developing .NET modules) and for a custom command called MYCUSTOMCOMMAND. If I type NL and then MCC at the AutoCAD command-line, after saving the file and re-starting AutoCAD, I see:

Command: NL


Command: MCC

Unknown command "MYCUSTOMCOMMAND".  Press F1 for help.

Now the fact that MCC displays an error is fine - I don't actually have a module loaded that implements the MYCUSTOMCOMMAND command - but we can see that it found the alias and used it (and the MYCUSTOMCOMMAND name could also be used to demand-load an application, for instance).


TrackBack URL for this entry:

Listed below are links to weblogs that reference Adding aliases for custom AutoCAD commands:

blog comments powered by Disqus


10 Random Posts