Please check the OSMODE system variable - the example below will set the END mode:
Code:[setvar OSMODE 1)
Registered forum members do not see this ad.
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)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
thanks in advance
Please check the OSMODE system variable - the example below will set the END mode:
Code:[setvar OSMODE 1)
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3
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![]()
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 <Enter>:
Code:(findfile "acad.pgp")
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3
have tried that already... but i think pgp is only for commands
An AutoLISP command may be called transparently - see below example for END mode:
However to call it will require an extra quote symbol:Code:(defun c:EE( / oldOsMode myPoint ) (setq oldOsMode (getvar "OSMODE")) (setvar "OSMODE" 1) (setq myPoint (getpoint)) (setvar "OSMODE" oldOsMode) myPoint )
Command: LINE
Specify first point: 'ee
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3
now i get it... sorry, my bad... so that's the reason why you told me to check the OSMODE sys varia
thanks againbut 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
![]()
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] <real time>:
>>>>Specify opposite corner:
Resuming LINE command.
Specify first point:
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3
thanks a lot
Registered forum members do not see this ad.
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.
"Potential has a shelf life." - Margaret Atwood
Bookmarks