Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Custom Alias for Compound Command

bretwieseler
Advocate

Custom Alias for Compound Command

bretwieseler
Advocate
Advocate

Creating a custom alias for a simple command is easy enough:  <Alias>,*<Full command name>,

but how do I create an alias for a compound command, e.g.  <mead>,*<measuregeom [-distance]>?

 

-Thanks

-Bret


3.6 GHz 8-Core Intel Core i9 | 13.6.1 | AutoCAD LT for MAc 2024.1
0 Likes
Reply
Accepted solutions (1)
524 Views
3 Replies
Replies (3)

maxim_k
Consultant
Consultant
Hi Bret,

If you are using full AutoCAD (not LT), and you want an "alias" for command with options, than you can create simple AutoLISP routine which will create new alias like ccommand.

In your case it will look like this:

(defun C:MEAD ( / )
(command "_MEASUREGEOM" "_D")
)

After you will load this routine you will be able to use MEAD "alias" which will call MEASUREGEOM command with Distance option.

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes

bretwieseler
Advocate
Advocate

Thanks Maxim.

 

Am I able to load a lisp routine directly from the  command line?

 

-Bret


3.6 GHz 8-Core Intel Core i9 | 13.6.1 | AutoCAD LT for MAc 2024.1
0 Likes

maxim_k
Consultant
Consultant
Accepted solution
Yes,

You can copy - paste the code to the Command window.
Just hit Return after the last parenthesis.
If everything is correct, you should see:
C:MEAD
at the command prompt.

Maxim

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes