YZ Posted July 13, 2010 Posted July 13, 2010 I am exploring the following macro: ^C^C_-layer;LO;[select All] I cannot work out how to automatically select all layers to lock them. I cannot create a standard list because each drawing is different. Should I use a DIESEL expression to extract all the names? Or is there a wildcard key like "*" that will select all? Quote
Pablo Ferral Posted July 13, 2010 Posted July 13, 2010 try this at the command line: -layer lock enter all enter Quote
YZ Posted July 13, 2010 Author Posted July 13, 2010 Thanks Pablo, Using "all" has no effect on my layers. So I still need to dig deeper for a solution. Also, thanks to whoever moved this thread for me. I could not find the customization forum anywhere. I found it now! Quote
cadvision Posted July 14, 2010 Posted July 14, 2010 See you need to be an old AutoCAD user that remembers dos shortcuts! '-LAYER LO *;; * for select all ;; to return to command line Quote
YZ Posted July 14, 2010 Author Posted July 14, 2010 See you need to be an old AutoCAD user that remembers dos shortcuts! I wish I was an old AutoCAD user! I thought I tried "*" already, but when you posted that I tried again and it work perfectly. It will even pick up anything with a common prefix like "HEIGHT_*". Thanks. Quote
Pablo Ferral Posted July 14, 2010 Posted July 14, 2010 '-LAYER LO *;; Notice the space betwhen 'LO' and '*' - this counts as a carridge return (enter). Try it at the command line, you will find that after you type LO and hit enter you will need to hit enter agin before you can use 'All'. That's what I was hinting at... Quote
YZ Posted July 26, 2010 Author Posted July 26, 2010 Can anyone confirm if the same principle will work for RENAME command? I can get it to run in the command line, but it won't accept *. My macro so far looks like ^C^C-rename LA * SYM_*; (Trying to add the prefix SYM_ to every layer). I can do this successfully in the dialog box - see attachment showing all blocks highlighted when using the * in the "Old Block Name" field: Quote
cadvision Posted July 26, 2010 Posted July 26, 2010 Can't use in the same way to rename layers sorry. Might be something for drawing standards try the _LAYERSTATE command if talking about renaming layers. You can activate the command line rename command with -rename (no dialog box) Quote
YZ Posted August 5, 2010 Author Posted August 5, 2010 try the LAYTRANS cmmand Thanks cadvision. I tried LAYTRANS, but it does not work on my machine. I suspect it is not an LT command. I got a wrote macro today that Unlocks all layers. Another great breakthrough for me, so thanks everyone. I am still stumped by the -rename command. I can do it on the command line using *, but then in a macro * just returns a message saying "invalid layer selection". Why wouldn't it work exactly the same? Quote
alanjt Posted August 5, 2010 Posted August 5, 2010 You can prefix all layers from the Rename dialog. Select "Layers" in "Named Objects" list. In "Old Name" text section, type "*". In "Rename To" text section, type "PREFIX-*" and hit enter. Quote
YZ Posted August 5, 2010 Author Posted August 5, 2010 Thanks Alan. I do understand how to do this at the command line. The difficulty is that it does not behave the same once that is in a macro. It just says "Layer Selection Invalid". Can you confirm if it works for you inside a macro? Quote
alanjt Posted August 5, 2010 Posted August 5, 2010 Much unlike Rename, -Rename will only work with one layer/block/etc. at a time. It's about the only commandline version of something that is crippled. Quote
YZ Posted August 5, 2010 Author Posted August 5, 2010 Ahaa. Well, I must have been remembering -layer that could accept * at the command line and perform multiple changes at once. Oops. That confirms that it will not ever work on a macro! Thanks Alan. I will contact Autodesk about this and see if it can be changed. Quote
alanjt Posted August 5, 2010 Posted August 5, 2010 That's twice you claim to be able to contact Autodesk in regards to a 'missing option'. Do you have some 'in' with the company? Quote
YZ Posted August 24, 2010 Author Posted August 24, 2010 That's twice you claim to be able to contact Autodesk in regards to a 'missing option'. Do you have some 'in' with the company? Haha, no I definitely do not have an "in" with the company! But a man can dream. I certainly put things on AUGI wishlist, but usually my suggestions are too specific to appeal to the masses. Lately I have been emailing Autodesk through the Tech Support in Subscription Centre. Haven't seen it have any effect yet, but I am a big believer in feedback. Quote
Buggsy Posted November 26, 2010 Posted November 26, 2010 (edited) Macro to lack layers Can we modify this to lock layers with the exception of the current layer? I need current layer on and this doesn't do it in 2004 ^C^C'-LAYER;LO;*; Edited November 26, 2010 by Buggsy Quote
Buggsy Posted November 26, 2010 Posted November 26, 2010 I suppose that I have found the answer, but it this the best way? ^C^C'-LAYER;LO;*;Unlock ; Quote
YZ Posted January 10, 2011 Author Posted January 10, 2011 Sorry Buggsy, that's a pretty poor welcome to the forum by all of us. I have not had time to log on here for over 2 months. Trust me you will get a much better response in future, the users on here are fantastic. I did not know the answer to your 1st post. So you have taught me how to do this with your second post. To me that looks about as efficient as you are going to get. And, in my mind, if it works then it's perfect! Quote
Buggsy Posted January 10, 2011 Posted January 10, 2011 I've been wondering if there would be a reply. Thanks. The way this one works is, it locks all the layers and gives the operator the oppertunity to pick one layer to keep unlocked. I've been doing design work for about 15 years now and started with Version 12 if I remember right. I got laidoff from my last employer a couple of yrs ago and been free lancing since. I just got called back to my last employer 5 months ago. I have 3 systems set up at home with 2004 2008 2010 and Inventor 2010. Depending on what I need to design depends on which system is used. The down fall from using different versions and systems is that not all of them work exactly alike. They are close but not the same. That is what I'm trying to fine tune. I will have more questions for all of you guys out there. I'm not the best but I do have my pros & cons on these lisp files Gotts go, the boss wants to meet on a new project. 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.