create command alias for particular commands via lisp

create command alias for particular commands via lisp

Anonymous
Not applicable
1,704 Views
3 Replies
Message 1 of 4

create command alias for particular commands via lisp

Anonymous
Not applicable

hi everyone,

I would like to customize my user's profile so that it is possible for autocad to execute following commands via alias such as:

 

reinit,    *ri

laylck,    *ll
laymcur,   *lc
layulk,    *lu
layerp,    *lp
layiso,    *li
layoff,    *lf
layon,    *lo

 

it would be great if you could give me some advice how I should do this, then so far I tried editing the acad.pgp but it didn't work.

thanks in advance

 

 

0 Likes
Accepted solutions (1)
1,705 Views
3 Replies
Replies (3)
Message 2 of 4

dbhunia
Advisor
Advisor
Accepted solution

Did you tried it using "aliasedit"? then "Add"?


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 3 of 4

Moshe-A
Mentor
Mentor

@Anonymous hi,

 

it is almost good except you switched format. the shortcut name should be first field and the real command is second  (look at acad.pgp how it's done)

also be aware that you may have conflicts in LI with LIST and LO with -LAYOUT standard commands

the latest appears in file overrides Smiley LOL

 

moshe

 

 

Message 4 of 4

Sea-Haven
Mentor
Mentor

Rather than using acad.pgp its just as easy to make your own defuns with lisp. You load this lisp on startup. 

 

(defun c:PTY ()
(setvar 'pdmode 35) ; turn on ptype
(setvar 'pdsize 0.1)
)
(defun C:47 ()(setvar "osmode" 47)) ; osnaps

 

 

0 Likes