Jump to content

Recommended Posts

Posted

i usually turn this off on my snap settings so i frequently use shortcuts for it

 

perpendicular- per

nearest- nea

tangent-tan

mid bet 2 points-m2p ; mtp

from- fro

intersection- int

 

but im wondering if there's a way through lisp that can change this shortcut. for e.g. fro id like to change to ff and mtp to mm (because i used this a lot when im drafting) :unsure: i know there's a shift+right click and also to put a keyboard shortcut override (but it uses shift or control combi keys) but i really like to see this on a lisp routine :D thanks in advance

Posted

Please check the OSMODE system variable - the example below will set the END mode:

[setvar OSMODE 1)

Posted

thanks for the quick reply

but my question is how to change the shortcut value of the default

 

in my e.g. i want to use "mm" key for "mtp" after the command ask for a displacement.

 

even in cui i tried and cant do that so i figured maybe on lisp i can change that parameter.

 

what i understand for your given system varia is to turn the snap on which corresponds to value :)

Posted

The shortcuts are defined in acad.pgp file - although I'm not sure if this includes Osnap modes, too. To locate this file input the line below on your command prompt followed by :

(findfile "acad.pgp")

Posted

have tried that already... but i think pgp is only for commands

Posted

An AutoLISP command may be called transparently - see below example for END mode:

(defun c:EE( / oldOsMode myPoint )
(setq oldOsMode (getvar "OSMODE"))
(setvar "OSMODE" 1)
(setq myPoint (getpoint))
(setvar "OSMODE" oldOsMode)
myPoint
)

 

However to call it will require an extra quote symbol:

Command: LINE

Specify first point: 'ee

Posted

now i get it... sorry, my bad... so that's the reason why you told me to check the OSMODE sys varia :oops:

thanks again :D but the reason i want to change the shortcut of it is for me to have an easy access on my left hand but the quote key is across... anyway you can remove the extra quote symbol when i like to call it in... thanks again :)

Posted
anyway you can remove the extra quote symbol when i like to call it in...

Not sure that understand what you mean. To call transparently a command - that it, call a command while another command is in progress - you should use the quote mark; otherwise the input will be rejected.

Command: LINE

Specify first point: ZOOM

Invalid point.

Command: LINE

Specify first point: 'ZOOM

>>Specify corner of window, enter a scale factor (nX or nXP), or [All/Center/Dynamic/Extents/Previous/Scale/Window/Object] :

>>>>Specify opposite corner:

Resuming LINE command.

Specify first point:

Posted

Mircea,

 

Perhaps using the built-in transparent OSNAPS would be preferred to defining a custom LISP for each, for example the END transparent command (no quote needed) in the above sample.

 

Newer version of AutoCAD have made it more difficult (at least Civil 3D has) to add custom shortcut menus via the Control (Ctrl) key + Right click. Now, one must use Shift instead.

Posted
Perhaps using the built-in transparent OSNAPS would be preferred to defining a custom LISP for each, for example the END transparent command (no quote needed) in the above sample.

From what I understood, the OP was looking to associate new shortcuts to some Osnap modes to be easier to call them.

Posted

Whats wrong with shift and right button mouse ? This wont do MTP though

Posted
From what I understood, the OP was looking to associate new shortcuts to some Osnap modes to be easier to call them.

That's right :D I really like to change the shotcuts for the OSNAP modes so that the alias can be accesible with only the left hand when i want an OSNAP override. as you may guess, I'm not a fan of ribbons and toolbar.

 

Whats wrong with shift and right button mouse ? This wont do MTP though

mtp is way across the keyboard :) shift and right click is okay but i think the best is to assign it on the function keys especially f1.When you thought you hit esc key but theres a sudden pop up help window on your screen :lol: it would also be great if you can assign on "~ key" also... i haven't tried that ",)

Posted
From what I understood, the OP was looking to associate new shortcuts to some Osnap modes to be easier to call them.

 

That's right :D I really like to change the shotcuts for the OSNAP modes so that the alias can be accesible with only the left hand when i want an OSNAP override. as you may guess, I'm not a fan of ribbons and toolbar.

 

To each their own; I personally find it to take less time to type the built-in transparent OSNAPS than the time required to code each of my own custom OSNAP commands especially to only save one key-stroke (using the earlier example: END vs. EE).

 

** Edit - Then there's also the issue of deploying these customizations to others, if this is not part of the Enterprise setup it could cause potential issues for work sharing, etc..

 

Separately, you may also find Gile's Custom OSNAPs to be useful (I know I do!). :thumbsup:

 

Whats wrong with shift and right button mouse ? This wont do MTP though

 

1+

 

We also _used to_ have a Ctrl + Right Click shortcut menu for double-OSNAPs, but Civil 3D has taken over the Ctrl Key OOTB, which has also prevented Managed Hotkeys from working properly as well. I think I might just have to modify the Shift + Right Click shortcut menu. Just haven't had the time to do so yet. *kicks dirt*

Posted

MTP (Mid Between 2 Points) is available in the Shift+Right-Click menu since at least AutoCAD 2008 AFAIK.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...