Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

BAD ssget function

Status
Not open for further replies.

Skulstad

Geotechnical
Jul 23, 2002
4
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 &quot;X&quot; '((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.



 
Replies continue below

Recommended for you

Try:

(ssget &quot;X&quot; (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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor