shakuhachi Posted May 8, 2011 Posted May 8, 2011 I have around 400 MEP drawings that I need to plot. I can't use the publish command because I need to turn off the "revision" and "Permit revision" layers. I'm opening each drawing to turn off the layers and it's a pain. Is there a way to turn off the layer without opening the drawings. Any help is much appreciated. Quote
Ahankhah Posted May 8, 2011 Posted May 8, 2011 1- Simply save the following code into acaddoc.lsp file (if (= 1 (getvar 'Dwgtitled)) (progn (command "._LAYER" "_OFF" "revision,Permit revision" "") (command "._QSAVE") (command "._CLOSE") ) ) 2- Move acaddoc.lsp to the folder containing the metioned 400 drawings. 3- open AutoCAd (or MEP). 4- Open the folder with Explorer. 5- Press Ctrl+A to select all drawings. 6- Drag and Drop the selected drawings into AutoCAD. Be aware to drop them only in menus area and not drawing or command area. 7- Wait for AutoCAD to do the rest. 8- After finishing the task, delete acaddoc.lsp. Quote
Jeff H Posted May 8, 2011 Posted May 8, 2011 shakuhachi, I am sure your talking about renovation mode How are your settings set up----Hide demo objects and how are the layers assigned. And lastly are all the drawings in a folder hierarchcy? For you guys who have never played with MEP or Arch there is a thing called renevation mode, basiclly you add or draw things as new, demo, or existing and if it is on demo it takes current layer and creates a new one with the same name with a -D or (demo) added to end . When you want to view a new or revision drawing it hides all objects on layers that end with -d or what specified. Or if you view exisiting it will turn off all objects that are not on layers that end with -E & -D. Quote
Lee Mac Posted May 8, 2011 Posted May 8, 2011 Hi shakuhachi, I can't speak for the capabilities of MEP, so I'm sure Jeff will put you on the right track in that respect. But from an AutoCAD perspective, you could go the route of ObjectDBX and process all the drawings without opening them. I have created an ObjectDBX Wrapper to enable users to evaluate a function on a set of drawings, found here. Ensure it is loaded, and call it with this function: (defun c:test ( / layString ) (setq layString "REVISION,PERMIT REVISION") (foreach x (LM:ODBX (function (lambda ( x / lay ) (vlax-for lay (vla-get-layers x) (if (wcmatch (strcase (vla-get-name lay)) layString) (vla-put-layeron lay :vlax-false) ) ) ) ) nil t ) (princ (strcat "\n--> Drawing: " (car x) (if (vl-catch-all-error-p (cdr x)) (strcat "\n Error: " (vl-catch-all-error-message (cdr x))) "\n Successful." ) ) ) ) (princ) ) If you get stuck, let me know. Lee Quote
shakuhachi Posted May 8, 2011 Author Posted May 8, 2011 Wow guys, you are all amazing. I've been doing that for the past 3 years and keep getting tired of it. You just save a lot of man power hours in our office. THANK YOU ALL! Quote
Lee Mac Posted May 8, 2011 Posted May 8, 2011 (edited) You're welcome shakuhachi - so my ObjectDBX program worked? Edited May 8, 2011 by Lee Mac 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.