hosannabizarre Posted July 16, 2010 Posted July 16, 2010 I have a useful lisp routine for changing the attributes of text nested in blocks. It goes: (defun c:ATR (/ com val) (initget 1 "Height Angle Style Layer Color") (setq com (getkword "\nEnter Command (Height/Angle/Style/Layer/Color): ")) (setq val (getstring "\nEnter Value: ")) (prompt "\nSelect Attributes by Crossing Window: ") (command ".attedit" "y" "*" "*" "*" "c" pause pause) (while (> (getvar "cmdactive") 0) (command com val "n") ) (princ) ) How could I modify this such that the "Layer" option is automatically selected (instead of the user being prompted to pick an attribute to change). How can I modify it further such that the value for the Layer name is automatically asigned to "LAYER_11". With the end result that all the user has to do is drag out a box, which will change the layer attribute to "LAYER_11" I'm sure there can't be much to achieving this. Thanks, hosannabizarre Quote
hosannabizarre Posted July 16, 2010 Author Posted July 16, 2010 Figured it out: (defun c:ATR (/ com val) (initget 1 "Height Angle Style Layer Color") (setq com "Layer") (setq val "LAYER_11") (prompt "\nSelect Attributes by Crossing Window: ") (command ".attedit" "y" "*" "*" "*" "c" pause pause) (while (> (getvar "cmdactive") 0) (command com val "n") ) (princ) ) This is great for changing the layer attribute of blocks without actually using EATEDIT. Just change "LAYER_11" to the name of the layer you want to change to. Swipe an area and BAM! All the layers, even nested stuff, gets changed. 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.