mikey0615 Posted June 14, 2019 Share Posted June 14, 2019 Hi, I would like to find a list that does below: Set by layer Laythw Turn on all layer Turn all layer to color(8) grey Remove all hatch. Remove dimensions Remove elevation tag Remove section tag remove window and door tag Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted June 14, 2019 Share Posted June 14, 2019 (edited) Can you upload a dwg with an example of each of these tags? I'm not sure what you mean there Anyway, here is most of your request. Command CP (for Clean Plan). You may need to press escape when the routine is done (I get a message "Hatch boundary associativity removed." on the command line) ;; TO DO: ;;Remove elevation tag ;;Remove section tag ;;remove window and door tag ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (vl-load-com) (defun layer_change_color (layerName color / ) (command "-LAYER" "_C" color layerName "" ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; CP for Clean Plan (defun c:cp ( / ss i obj) ;; mute the command line (setvar "cmdecho" 0) ;;Laythw (command "Laythw") ;;Turn on all layer (command "-LAYER" "ON" "*" "") ;;Turn all layer to color(8) grey (layer_change_color "*" ) ;;Remove all hatch. ;;Remove dimensions (setq ss (ssget "_X" (list (cons 0 "HATCH,DIMENSION") ))) (setq i 0) (repeat (sslength ss) (entdel (ssname ss i)) (setq i (+ i 1)) ) ;;Set all entities to ByLayer (setq ss (ssget "_X")) (setq i 0) (repeat (sslength ss) (setq obj (vlax-ename->vla-object (ssname ss i))) (vla-put-color obj 256); ByLayer (setq i (+ i 1)) ) ;; unmute the command line (setvar "cmdecho" 1) (princ "\nDone. Please press escape.") (princ) ) Edited June 17, 2019 by Emmanuel Delay Quote Link to comment Share on other sites More sharing options...
mikey0615 Posted June 14, 2019 Author Share Posted June 14, 2019 thanks emmanuel but i got below message when i tried it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 17, 2019 Share Posted June 17, 2019 (edited) Maybe a typo here we all do it, learnt something new today "laythw" (layer_change_color "*" (layer_change_color "*" 8 ) Edited June 17, 2019 by BIGAL Quote Link to comment Share on other sites More sharing options...
tzframpton Posted June 17, 2019 Share Posted June 17, 2019 I use a Script to accomplish this. I wrote mine back in 2005 and it still works today. Using Wildcards is great: https://knowledge.autodesk.com/support/autocad-map-3d/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/MAP3D-Use/files/GUID-BED8F649-3D1A-4641-A48F-562A2EBB927C-htm.html Quote Link to comment Share on other sites More sharing options...
mikey0615 Posted June 17, 2019 Author Share Posted June 17, 2019 Thanks for sharing that. but i can't find the script can you copy it here. Quote Link to comment Share on other sites More sharing options...
tzframpton Posted June 17, 2019 Share Posted June 17, 2019 Here's my script file. Open in Notepad. Each line break is considered an Enter keystroke. Just so you can follow the logic. Also, the "SBL" I believe is a LISP routine, so that may break the script for anybody else. -TZ BACKGROUND_v3.scr 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.