BAD ssget function
BAD ssget function
(OP)
I'm getting a 'bad' ssget function when I try and use a variable generated through a string catenation (strcat) that defines the name of a layer that I am trying to select using a autolisp selection set description.
Example:
(setq SHTNO (getint"\Enter sheet no: "))
(setq SHTNO1 (rtos SHTNO 2 0))
(setq SHTNO2 (strcat "mview" SHTNO1))
(ssget "X" '((8 . SHTNO1))) <--- Where I get problem
I've tried using the SHTNO1 variable in quotes and the like. Basically the SHTNO1 variable represents a layer name. I want to be able to perform a selection of all items on that layer within the lisp routine. Where am I going wrong?? Any help would be great.
Thanks, Erik.
Example:
(setq SHTNO (getint"\Enter sheet no: "))
(setq SHTNO1 (rtos SHTNO 2 0))
(setq SHTNO2 (strcat "mview" SHTNO1))
(ssget "X" '((8 . SHTNO1))) <--- Where I get problem
I've tried using the SHTNO1 variable in quotes and the like. Basically the SHTNO1 variable represents a layer name. I want to be able to perform a selection of all items on that layer within the lisp routine. Where am I going wrong?? Any help would be great.
Thanks, Erik.





RE: BAD ssget function
(ssget "X" (list (cons 8 SHTNO1)))
What you had would work if you supplied the actual layer name, but since you are using a variable you can't use the quote(').
HTH,
Carl