Edit Alias for Command Within A Command

Edit Alias for Command Within A Command

Anonymous
Not applicable
1,305 Views
11 Replies
Message 1 of 12

Edit Alias for Command Within A Command

Anonymous
Not applicable

Ok so when I work, I use the NEAREST command within object snap a lot, but I prefer that it is not selected all the time when object snap is on.

 

So when I am using a command already like drawing a polyline or moving the endpoint of a line - within that command i use the alias NEAR. 

 

Does anyone know if I can change the command for this alias command within a command? I'd just like to change it to N.

 

 

0 Likes
Accepted solutions (1)
1,306 Views
11 Replies
Replies (11)
Message 2 of 12

Patchy
Mentor
Mentor
Accepted solution

Not within acad.pgp but it can be assigned to a F function key (e.g. F2, F3.... ) in the CUI

 

or it can be done with autolisp, and when running the command, use a ' mark.

Message 3 of 12

Kent1Cooper
Consultant
Consultant

Just so you know, the first three letters are enough as abbreviations for Osnap modes -- you can type just NEA and get that mode.

 

But you can also define a "command" for it that can be used transparently.  Minimally tested:

(defun C:N () (command "_nearest"))

 

To use it in a drawing or editing command, you need to type the name with the asterisk prefix that @Patchy mentioned:  'N.  One keystroke shorter than NEA....

 

And NEArest could be put in a Tool Palette button, and probably some other menu-pick options.

Kent Cooper, AIA
Message 4 of 12

Patchy
Mentor
Mentor

Thank you for explaining it in detail, I know it works like that but if I write it, it confuses people (English is my 2nd language)

0 Likes
Message 5 of 12

Sofia.Xanthopoulou
Mentor
Mentor

Hi @Anonymous,

 

please take a look at this discussion - post no 14. Seems like it could work but should be a lot of work to rearrange all other snaps in order to make NEA working with only a <N>. 

 

Regards

 

 

-----------------------------
Please accept as solution if my post fully resolves your issue, or reply with additional details if the problem persists.

 

0 Likes
Message 6 of 12

Patchy
Mentor
Mentor

No #14 Smiley Very Happy

0 Likes
Message 7 of 12

Sofia.Xanthopoulou
Mentor
Mentor

Oh, come on ... as if you never forget anything Smiley Happy

 

Well, at least I amused you Smiley Wink

 

Thanks for the catch Patchy - link is inserted.

 

Regards

 

0 Likes
Message 8 of 12

ВeekeeCZ
Consultant
Consultant

From my experience (and my settings) are F* keys the best option.

I have F1 for nearest and F2 for perpendicular. 

Message 9 of 12

Anonymous
Not applicable

Thanks all. I was able to assign it to F2 which seemed the easiest (and learned about the CUI). Ctrl + right click + "N" doesnt seem to save much effort from typing "NEA"

0 Likes
Message 10 of 12

scot-65
Advisor
Advisor
Please unassign the [F2] key. It is used to flip the TEXTSCREEN.

Our setup:
F1 - CEN
F2 - Default behavior (TEXTSCREEN)
F3 - ENDP (notice the 4th character?)
F4 - MID
F5 - PER
F6 - NEA
F7 - NODE
F8 - Default behavior (ORTHOMODE)
F9 - INT
F10 - NONE
F11 - QUAD
F12 - TAN

To access the original key assignment press and
hold the [Shift] key, then press desired F# key.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 11 of 12

bdesign71
Contributor
Contributor
Hi, Great idea, can you supply a sample lisp code on how to redefine the f keys. I did it years ago but things change. Thanks and Great skill
0 Likes
Message 12 of 12

Patchy
Mentor
Mentor

CUI command, and this is my F9 for snapping to Endpoint.

 

F9.JPG

0 Likes