Hi.I am trying to write a lisp code to search if same layers exist in the drawing and delete them. Some of this layer must not exist in the drawing.
I add a list of layers , perhaps i add more if this code complete. The problem is when find the first not exist layers the code stop and gives me this
Command: DELLCAD
_laydel
Select object on layer to delete or [Name]: n
Enter layer name or [?]: 3DFLOOR
Invalid Layer name.
Enter layer name or [?]:
Select object on layer to delete or [Name/Undo]: yes
*Invalid selection*
Expects a point or Last/Name
; error: Function cancelled
(command "_laydel" "n" "CLOSETS-3D" "" "yes") );end if
(command "_laydel" "n" "3DFLOOR" "" "yes") );end if
(command "_laydel" "n" "3DFURNIT" "" "yes") );end if
(command "_laydel" "n" "3DROOF" "" "yes") );end if
(command "_laydel" "n" "3DSTAIR" "" "yes") );end if
(command "_laydel" "n" "3DTERRAIN" "" "yes") );end if
(command "_laydel" "n" "3DKITBATH" "" "yes") );end if
(command "_laydel" "n" "3DSILL_WALLS" "" "yes") );end if
(command "_laydel" "n" "3DWDGLASS" "" "yes") );end if
(command "_laydel" "n" "3DWIN_MARB" "" "yes") );end if
(command "_laydel" "n" "3DWINDR" "" "yes") );end if
(command "_laydel" "n" "FURNITURE-3D" "" "yes") );end if
(command "_laydel" "n" "KITCBATH-3D" "" "yes") );end if
)
Can any one help?
Thanks