Why error
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Why error

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Adesu
Guest





Posted: Tue Jan 04, 2005 6:55 am    Post subject: Why error Reply with quote

_2$ (setq ss (ssget "x" '((cons 0 ob))))

; error: bad SSGET list

_3$ (setq ss (ssget "x" '((0 . "POINT"))))

<Selection set: 1c>

Back to top
Jason Piercey
Guest





Posted: Tue Jan 04, 2005 7:20 am    Post subject: Re: Why error Reply with quote

Try

(setq ss (ssget "x" (list (cons 0 ob))))

When using CONS, do not QUOTE the list


--
Autodesk Discussion Group Facilitator


"Adesu" <mteybid@yuasabattery.co.id> wrote in message news:41d9f824_1@newsprd01...
Quote:
_2$ (setq ss (ssget "x" '((cons 0 ob))))

; error: bad SSGET list

_3$ (setq ss (ssget "x" '((0 . "POINT"))))

Selection set: 1c

Back to top
Adesu
Guest





Posted: Tue Jan 04, 2005 7:40 am    Post subject: Re: Why error Reply with quote

_3$ (setq ob (strcase (getstring "\nENTER NAME OBJECT: ")))

"POINT"

_3$ (setq ss (ssget "x" (list (cons 0 ob))))

<Selection set: 10>

Hi Jason,that right and thanks a lot

Jason Piercey <nomail> wrote in message news:41d9fd51_1@newsprd01...
Quote:
Try

(setq ss (ssget "x" (list (cons 0 ob))))

When using CONS, do not QUOTE the list


--
Autodesk Discussion Group Facilitator


"Adesu" <mteybid@yuasabattery.co.id> wrote in message
news:41d9f824_1@newsprd01...
_2$ (setq ss (ssget "x" '((cons 0 ob))))

; error: bad SSGET list

_3$ (setq ss (ssget "x" '((0 . "POINT"))))

Selection set: 1c





Back to top
Tom Smith
Guest





Posted: Tue Jan 04, 2005 7:32 pm    Post subject: Re: Why error Reply with quote

It is an easy mistake to make. You can't quote the filter list unless you
want it to be taken literally, for instance (setq ss (ssget "x" '((0 .
"POINT")))). If there's anything in the list that needs to be evaluated,
such as a cons or a variable name, then you have to do it as Jason showed.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB