Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Jul 23, 2002
Messages
4
Location
US
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.



 
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

Back
Top