×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BAD ssget function

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.



RE: BAD ssget function

Try:

(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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources