First of all, Thanks to Paul and Scott for there feedbacks on Pauls earlier post "VB.net and AutoCad Programming" (sorry to sidetrack you like that Paul). And I do have a tendency not to do enough error checking in my code. The prob. was the SelectionSet already existed. And now on to my new Autolisp problem. I create a selection set of objects that exitst in multiple layouts. After it runs it says "20 were not found in the current space." Will I need to put the code in a loop to catch all the layouts. Here is the if statement
(if (tblsearch "LAYER" "1"
(progn
(command "-LAYER" "c" "11" "1" ""
(setq sset (ssget "X" '((8 . "1")))
(if sset (command ".CHANGE" sset "" "p" "c" "11" "")))
(if (tblsearch "LAYER" "2"
(progn
(command "-LAYER" "c" "13" "2" ""
(setq sset (ssget "X" '((8 . "2")))
(if sset (command ".CHANGE" sset "" "p" "c" "13" "")))
);progn
);if
Thanks
(if (tblsearch "LAYER" "1"
(progn
(command "-LAYER" "c" "11" "1" ""
(setq sset (ssget "X" '((8 . "1")))
(if sset (command ".CHANGE" sset "" "p" "c" "11" "")))
(if (tblsearch "LAYER" "2"
(progn
(command "-LAYER" "c" "13" "2" ""
(setq sset (ssget "X" '((8 . "2")))
(if sset (command ".CHANGE" sset "" "p" "c" "13" "")))
);progn
);if
Thanks