Jessica28 Posted November 2, 2010 Posted November 2, 2010 I'm running autocad 2011. I've gotten used to the ribbon but I like typing in commands. One that I wanted to be able to type is "unlock all" without going into my layer manager. Quote
lpseifert Posted November 2, 2010 Posted November 2, 2010 add this to your acad.pgp file (defun c:UnlockAll () (command "-layer" "u" "*" "")) Quote
eldon Posted November 2, 2010 Posted November 2, 2010 One that I wanted to be able to type is "unlock all" without going into my layer manager. The secret is to type "-la". The "-" stops the layer manager dialogue screen from opening up. So your command should go like this: -la (enter) u (enter) * (enter) (enter) which is probably quicker than typing "UnlockAll" Quote
Tiger Posted November 2, 2010 Posted November 2, 2010 The secret is to type "-la". The "-" stops the layer manager dialogue screen from opening up. So your command should go like this: -la (enter) u (enter) * (enter) (enter) which is probably quicker than typing "UnlockAll" Then do it like this: add this to your acad.pgp file (defun c:[b]UA[/b] () (command "-layer" "u" "*" "")) Ofcourse, I would choose LU instead since L and U are close together... :D Quote
Jessica28 Posted November 2, 2010 Author Posted November 2, 2010 where in my pgp would i add it? just make a new line and put it anywhere? Or does it need ot be in a specific place?.....The -LA command is a way to do it but its too many keys to type..I wanted to run the command by just typing a letter or 2.. Quote
rkent Posted November 2, 2010 Posted November 2, 2010 For what it is worth, the - before the layer command isn't needed in the lisp routine, try it without the -, I just did and it still works, IE: no dialog pops up. Quote
alanjt Posted November 2, 2010 Posted November 2, 2010 Will this work on LT? Macro it: ^C^C-layer;unlock;*;; I'm not a button/macro user, but that should work. Quote
Glen1980 Posted November 2, 2010 Posted November 2, 2010 Must harass my Manager about letting me have that license of full AutoCAD that no-one is using anymore! Quote
alanjt Posted November 2, 2010 Posted November 2, 2010 Must harass my Manager about letting me have that license of full AutoCAD that no-one is using anymore! MMM, LISP capabilities. Quote
Jessica28 Posted November 2, 2010 Author Posted November 2, 2010 ok..The macro didnt work. Unless i did something wrong..But i think i created it right....I'm fairly to this. But figured I could handle this : ( Any other help you guys could give me would be greatly appreciated... Quote
alanjt Posted November 2, 2010 Posted November 2, 2010 ok..The macro didnt work. Unless i did something wrong..But i think i created it right....I'm fairly to this. But figured I could handle this : ( Any other help you guys could give me would be greatly appreciated... Try it this way (remove quotes, but keep all spaces). "^C^C-layer unlock * " Quote
Jessica28 Posted November 2, 2010 Author Posted November 2, 2010 Nope. Could it have to do with the * symbol? DOesnt that mean something else when writing a macro? Bear in mind i'm just learning about macros if I sound like I dont know what i'm talking about. : ) Quote
Glen1980 Posted November 3, 2010 Posted November 3, 2010 (edited) When I create macro's or scripts I always test it in the command line first and write all the keypresses down to make sure it works. In this case -layer, see what happens, AutoCAD will generally prompt you for what commands to type next in the command line, then try the next bit unlock, then try the * or whatever AutoCAD prompts you. Remember that the letter written in capitals at the prompt is the shortcut letter, although when the option is on and off they will both be all in captials. Edited November 3, 2010 by Glen1980 Forgot a few words ;) Quote
ReMark Posted November 3, 2010 Posted November 3, 2010 Try this for your macro instead. ^C^C_-LAYER;_UNL;*; 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.