I'm trying to write a lisp routine where I can click on an item (all I get are ASSURFACE to work with) and it pulls the color off that item. Then it needs to select all entities with that color to a certain layer (I've been using DATA_01, DATA_02, etc.). Then I want to freeze that layer.
The problem I'm having is the select by color and set that group to a layer.
If you can help me I'd appreciate it. I'm using MDT 2007.
Here's what I have so far:
(DEFUN C1 ()
(COMMAND "UNDO" "M")
(PRINC "\nSELECT THE COLOR YOU WANT TO PUT ON LAYER DATA_01... ")
(SETQ GROUP (SSGET)); <-- I think I need help here
(COMMAND "CHPROP" GROUP "" "LA" "DATA_01" "")
(COMMAND "-LAYER" "F" "DATA_01" "")
(PRINC "\nTHESE ITEMS HAVE BEEN PUT ON LAYER DATA_01.")
I've looked over the AMCOLOR.LSP and it looks like it sets a variable mycolor to 256 but I'm still not sure how to get all of a certain color by just picking an entity (in this case an ASSURFACE). This probably seems really easy to you but I'm lost. I know the property is set to 62.
The line is going to look something like this, right?
(setq group (ssget '(62 . XXX ) ) )
Once I get them I know how to set them to the DATA_01 layer and then freeze it.
This is frustrating. I feel like I'm really close to the answer.