toxicsquall Posted May 25, 2020 Share Posted May 25, 2020 Please, I need help to make a LISP to execute this comands in this order. Can you help me? ZOOM (EXTEND) > SELECT ALL OBJECTS > FLATTEN (REMOVE HIDDEN LINES = NO) > COLOR CONTROL = ALL BY LAYER > LINE TYPE CONTROL = ALL BY LAYER > LINE WEIGHT CONTROL = ALL BY LAYER > PURGE (PURGE ALL ITEMS) Can you help me? Quote Link to comment Share on other sites More sharing options...
dlanorh Posted May 25, 2020 Share Posted May 25, 2020 59 minutes ago, toxicsquall said: Please, I need help to make a LISP to execute this comands in this order. Can you help me? ZOOM (EXTEND) > SELECT ALL OBJECTS > FLATTEN (REMOVE HIDDEN LINES = NO) > COLOR CONTROL = ALL BY LAYER > LINE TYPE CONTROL = ALL BY LAYER > LINE WEIGHT CONTROL = ALL BY LAYER > PURGE (PURGE ALL ITEMS) Can you help me? Does the flatten, color, linetype and lineweight all bylayer apply to objects within blocks? Quote Link to comment Share on other sites More sharing options...
dlanorh Posted May 25, 2020 Share Posted May 25, 2020 OK, try the attached. If you want entities within blocks included, it will need a few extra lines of code. AllByLayer.lsp 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 26, 2020 Share Posted May 26, 2020 Maybe something like this ; converts blocks to bylayer proerties (setq doc (vla-get-activedocument (vlax-get-acad-object))) ; open database (vlax-for block (vla-get-blocks doc) (if (not (wcmatch (strcase (vla-get-name block) t) "*_space*")) (vlax-for ent block (vla-put-color ent 0) (vla-put-linetype ent "Bylayer") (vla-put-lineweight ent aclnwtbylayer) ) ) ) 1 Quote Link to comment Share on other sites More sharing options...
toxicsquall Posted May 26, 2020 Author Share Posted May 26, 2020 It works really well!!! Thanks!!!! 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.