mdwebneck Posted September 4, 2014 Share Posted September 4, 2014 I have a bunch of drawings from our client that were created for construction purposes and were originally made in a Microstation 3D parametric environment so is full of blocks with embedded layers. Some layers are either not necessary for my 2D work or do not comply with our layername standard, so have been merging the unnecessary layers to 0, so I can move the blocks to proper AIA cad layer names. Is there a way to get "inside" the layer merge command and change the default delete prompt from No to Yes, so I can use the mouse R-click to accept, rather than having to type in Yes everytime? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 4, 2014 Share Posted September 4, 2014 (edited) I have a bunch of drawings from our client that were created for construction purposes and were originally made in a Microstation 3D parametric environment so is full of blocks with embedded layers. Some layers are either not necessary for my 2D work or do not comply with our layername standard, so have been merging the unnecessary layers to 0, so I can move the blocks to proper AIA cad layer names. Not sure what version you're using, but you may also want to obtain the necessary service pack, etc. to utilize DGNPURGE functionality as well, which is built into 2015. Is there a way to get "inside" the layer merge command and change the default delete prompt from No to Yes, so I can use the mouse R-click to accept, rather than having to type in Yes everytime? Not that I know of, but it is simple to code a small LISP routine that will accomplish same: (defun c:FOO (/ ss) (prompt "\nSelect layers to merge with layer \"0\": ") (if (setq ss (ssget "_:L")) (command "._-laymrg" ss "" "_n" "0" "_y") ) (princ) ) Cheers Edited September 4, 2014 by BlackBox Word selection. Grr Quote Link to comment Share on other sites More sharing options...
mdwebneck Posted September 4, 2014 Author Share Posted September 4, 2014 OK APParently I am lisp challenged ... no real surprise since i've never been involved in creating them i pasted the code you have above into a text file, saved it as a .lsp loaded it from the lisp app in autocad which acknowledged it was loaded but no change in the laymrg function BTW I'm using v2011 MEP (acad classic enabled) and thanks for your help thus for Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 4, 2014 Share Posted September 4, 2014 OK APParently I am lisp challenged ... no real surprise since i've never been involved in creating themi pasted the code you have above into a text file, saved it as a .lsp loaded it from the lisp app in autocad which acknowledged it was loaded but no change in the laymrg function BTW I'm using v2011 MEP (acad classic enabled) and thanks for your help thus for No worries; we all start somewhere. To reiterate, one cannot modify the default settings, AFAIK (perhaps via Registry?)... However you can use LISP to call the -LAYMRG Command and supply the desired parameters, which is technically more efficient than even what you originally requested. The code I posted implements a custom 'command' named "FOO"... To invoke, simply load the LISP routine (I'd suggest an AUTOLOAD statement in your AcadDoc.lsp file), and then type "FOO" at the Command Line, and hit enter, or right click. Lemon squeezy. Cheers Quote Link to comment Share on other sites More sharing options...
RobDraw Posted September 5, 2014 Share Posted September 5, 2014 (I'd suggest an AUTOLOAD statement in your AcadDoc.lsp file) ... or put it in the "Start up suite" in the appload dialog box. Quote Link to comment Share on other sites More sharing options...
mdwebneck Posted September 5, 2014 Author Share Posted September 5, 2014 ... The code I posted implements a custom 'command' named "FOO"... To invoke, simply load the LISP routine (I'd suggest an AUTOLOAD statement in your AcadDoc.lsp file), and then type "FOO" at the Command Line, and hit enter, or right click. Lemon squeezy. Cheers Thanks, I didn't know about FOO now as mr T would say, "I pity the FOO " wink Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 5, 2014 Share Posted September 5, 2014 ... or put it in the "Start up suite" in the appload dialog box. I respectfully disagree. Startup Suite is less efficient, and less flexible than AcadDoc.lsp which is built-into the Startup Sequence, and generally a very short-sighted approach to customization in a real-world production environment for any user with more than a few custom routines. Thanks, I didn't know about FOO now as mr T would say, "I pity the FOO " wink No worries; you can change the 'FOO' to anything you want, as it is just a common sample name, like 'TEST', etc. ... Mad points for the Mr. T reference, BTW, sucka. Cheers Quote Link to comment Share on other sites More sharing options...
RobDraw Posted September 6, 2014 Share Posted September 6, 2014 I respectfully disagree. How can you disagree with something that works? You may have a valid point but I use it all the time to add or remove LISP routines and I work in a real world production environment. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 6, 2014 Share Posted September 6, 2014 (I'd suggest an AUTOLOAD statement in your AcadDoc.lsp file) ... or put it in the "Start up suite" in the appload dialog box. I respectfully disagree. How can you disagree with something that works? You may have a valid point but I use it all the time to add or remove LISP routines and I work in a real world production environment. Respectfully, and in this instance quite directly, based on personal experience maintaining multiple versions in both large, and now small production environments. Note that I didn't argue that Startup Suite doesn't work... I did however very clearly identify why it's less efficient, so others don't unknowingly go down a path with such limitations. Cheers Quote Link to comment Share on other sites More sharing options...
RobDraw Posted September 6, 2014 Share Posted September 6, 2014 Okay, whatever, I was only offering another safer option in case the OP was not familiar with editing that file. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 6, 2014 Share Posted September 6, 2014 Okay, whatever, I was only offering another safer option in case the OP was not familiar with editing that file. Thanks, RobDraw; I think it's a good thing to identify alternatives, as each inherently have their own trade-offs. Please explain how using Startup Suite is safer? Cheers Quote Link to comment Share on other sites More sharing options...
RobDraw Posted September 6, 2014 Share Posted September 6, 2014 I think you know as well as I do that, if a user that is not familiar with AcadDoc.lsp, that they may edit the closely related AcadyearDoc.lsp by mistake. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted September 8, 2014 Share Posted September 8, 2014 I think you know as well as I do that, if a user that is not familiar with AcadDoc.lsp, that they may edit the closely related AcadyearDoc.lsp by mistake. What I think you're attempting to point our is that any user code that is added to the AutoCAD-owned Acad20##Doc.lsp file can be overwritten with any application update, and user might lose their custom code without any warning... Technically, there are some that do this too, despite being advised against it because it 'works', which is in line with your criteria. If I go along with you, you've established that Startup Suite may be safer than using Acad20##Doc.lsp, but how is it safer than using AcadDoc.lsp, which was the context of your original statement? Cheers Quote Link to comment Share on other sites More sharing options...
RobDraw Posted September 8, 2014 Share Posted September 8, 2014 Look, I don't know why you are making such a big deal about this. I did not say that there was anything wrong with your method. Again, I was merely offering a different way of doing it as the OP did not recognize how to start the command and may not be familiar with the document that you suggested. In fact, it might not have even existed on the OPs computer. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted October 6, 2014 Share Posted October 6, 2014 I was reminded of this thread when I saw post #5 here: http://www.cadtutor.net/forum/showthread.php?39658-quot-replace-Z-Value-With-Current-Elevation-quot Quote Link to comment Share on other sites More sharing options...
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.