nelsonavirama Posted July 31, 2014 Share Posted July 31, 2014 Hi guys, need your help, I need a lisp to merge similar color layers into a new layer. I use 4 preset layers: grid, columns, walls, and various texts. Prepare the remaining drawing by the different layers with only 4 kinds of colors, but it is very wasteful to merge all those layers. Thank you for your valuable help. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 31, 2014 Share Posted July 31, 2014 LAYMRG command? Quote Link to comment Share on other sites More sharing options...
nelsonavirama Posted July 31, 2014 Author Share Posted July 31, 2014 LAYMRG command? I know the laymerge, but I need something faster. If you already have color layers, I might just be writing the "milispmerge" command and do the work of uniting all layers of similar colors. Is that many, many files every day. Thank you Quote Link to comment Share on other sites More sharing options...
nelsonavirama Posted August 1, 2014 Author Share Posted August 1, 2014 in this page i found the nex code: http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/LayMrg/td-p/3236852 ;;; (defun c:MergeTo0 (/ name layers) (vl-load-com) (vlax-for x (vla-get-layers (cond (*AcadDoc*) ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object)))) ) ) (if (not (wcmatch (strcase (setq name (vla-get-name x))) "0,DEFPOINTS,*|*")) (setq layers (cons name layers)) ) ) (cond ((not layers) (alert "Nothing to merge!")) (T (vl-cmdf "_.-layer" "_THAW" "0" "_SET" "0" "" "_.-laymrg") (foreach layer layers (vl-cmdf "_NAME" layer)) (vl-cmdf "" "_NAME" "0" "_YES") ) ) (princ) ) ;;; I want a similar command but grouping the layers to be joined by Color (use 4 colors white, 251, 6, 2, and 4 layers walls, columns, grid and text). Thank you 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.