minion Posted July 18, 2012 Posted July 18, 2012 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 Quote
MSasu Posted July 18, 2012 Posted July 18, 2012 Please check the OSMODE system variable - the example below will set the END mode: [setvar OSMODE 1) Quote
minion Posted July 18, 2012 Author Posted July 18, 2012 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 Quote
MSasu Posted July 18, 2012 Posted July 18, 2012 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") Quote
minion Posted July 18, 2012 Author Posted July 18, 2012 have tried that already... but i think pgp is only for commands Quote
MSasu Posted July 18, 2012 Posted July 18, 2012 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: LINESpecify first point: 'ee Quote
minion Posted July 18, 2012 Author Posted July 18, 2012 now i get it... sorry, my bad... so that's the reason why you told me to check the OSMODE sys varia thanks again 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 Quote
MSasu Posted July 18, 2012 Posted July 18, 2012 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: LINESpecify first point: ZOOM Invalid point. Command: LINESpecify 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: Quote
BlackBox Posted July 18, 2012 Posted July 18, 2012 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. Quote
MSasu Posted July 19, 2012 Posted July 19, 2012 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. Quote
BIGAL Posted July 20, 2012 Posted July 20, 2012 Whats wrong with shift and right button mouse ? This wont do MTP though Quote
minion Posted July 20, 2012 Author Posted July 20, 2012 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 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 it would also be great if you can assign on "~ key" also... i haven't tried that ",) Quote
BlackBox Posted July 20, 2012 Posted July 20, 2012 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 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!). 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* Quote
SLW210 Posted July 20, 2012 Posted July 20, 2012 MTP (Mid Between 2 Points) is available in the Shift+Right-Click menu since at least AutoCAD 2008 AFAIK. Quote
Recommended Posts
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.