AQucsaiJr Posted December 18, 2009 Author Posted December 18, 2009 Glad you got what you needed.Not that it's the best method, but you could even put everything into a .scr file and load it. I am not familiar with the .scr file type. Does that load differently than the LISP files? I guess what I am wondering is, is one way better than the other? LISP / .scr Quote
alanjt Posted December 18, 2009 Posted December 18, 2009 I am not familiar with the .scr file type. Does that load differently than the LISP files?I guess what I am wondering is, is one way better than the other? LISP / .scr The original file you posted was a .scr file. Quote
AQucsaiJr Posted December 18, 2009 Author Posted December 18, 2009 Haha... Opps... Oversight sorry.... So let me better phrase my question... Your saying I can load the whole code: (defun MergeLayers (#OldLayers #NewLayers / #Layers) (setq #Layers (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))) (mapcar '(lambda (o n) (and (tblsearch "layer" o) (or (tblsearch "layer" n) (vla-add #Layers n)) (vl-cmdf "_.-laymrg" "_n" o "" "_n" n "_y") ) ;_ and ) ;_ lambda #OldLayers #NewLayers ) ;_ mapcar ) (MergeLayers '("A" "B" "C" "D") '("1" "2" "3" "4")) into one .scr file and it will work the same way as loading the LISP and just calling out the line: (MergeLayers '("A" "B" "C" "D") '("1" "2" "3" "4")) ... Is there any benefit one way or the other? Is one quicker than the other? Quote
otil Posted December 31, 2009 Posted December 31, 2009 can you explain it to me how to work the "purgeall.scr with associated with the merge layer lisp. I was a liitle bit confused about this. Quote
Lee Mac Posted December 31, 2009 Posted December 31, 2009 What are you trying to achieve? The same thing or just a purge? Quote
otil Posted January 3, 2010 Posted January 3, 2010 What are you trying to achieve? The same thing or just a purge? Thanks for your immediate response. Praise God, for helping me, really you such a blessing for me. Its working now, the mrglayr lisp but this is good for only one drawings, we are looking to working in the batch drawing since we are working in more than 200+ drawings. What made me confused is the purge.scr how to execute the scr, Quote
Lee Mac Posted January 3, 2010 Posted January 3, 2010 You're welcome You could call the LISP using a script, something like: open "C:\\Users\\Lee Mac\\Documents\\Drawing1.dwg" (MergeLayers) save close open ... etc etc To run the script, just go to 'Tools' > 'Run Script'. Alternatively, type 'script' at the command line. Lee Quote
alanjt Posted January 3, 2010 Posted January 3, 2010 Thanks for your immediate response. Praise God, for helping me, really you such a blessing for me.Its working now, the mrglayr lisp but this is good for only one drawings, we are looking to working in the batch drawing since we are working in more than 200+ drawings. What made me confused is the purge.scr how to execute the scr, LoL That's one hell of a praise/thank you. Quote
Lee Mac Posted January 3, 2010 Posted January 3, 2010 LoLThat's one hell of a praise/thank you. Must be the effect I have on people... Quote
alanjt Posted January 3, 2010 Posted January 3, 2010 Must be the effect I have on people... Must be. ....... Quote
jcap91163 Posted October 19, 2010 Posted October 19, 2010 does the bindtype variable solve this problem? Quote
symoin Posted January 16 Posted January 16 hi Lee, can we use wild characters for the common part of the layers : Ex. '("*-Road-*" "*-Trees-*") '("Transport" "Landscape"). So all the layers with Roads can be merged into one etc..... Quote
Steven P Posted January 16 Posted January 16 You might need to write a little function to do a wildcard search on the layer names and use the results found to run the above Quote
BIGAL Posted January 16 Posted January 16 Using ssget filters will do what you want. Just wrap the example below with a list of layer names using (foreach la layers (setq ss (ssget '((8 . "*ROADS*)))) (command "chprop" ss "" "LA" "Mynewroads" "") 1 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.