The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 General Discussion
 Using lisp variable in SSGET expression

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
BKM Posted - February 26 2008 : 1:29:21 PM
I'm looking for help constructing a lisp SSGET statement that uses the value of a variable as part of the expression. I'm relatively inexperienced using lisp and need some direction.

This is the way the statement works normally, having the "TEST" supplied within the quotes:
(setq ss1 (ssget "X" '((0 . "INSERT") (2 . "TEST"))))

I would like to replace the "TEST" with input from a variable value. I've tried it like this:
(setq testval "TEST")
(setq ss1 (ssget "X" '((0 . "INSERT") (2 . testval))))
This doesn't work. Got any sugestions?

Thanks,
Ben
4   L A T E S T    R E P L I E S    (Newest First)
n/a Posted - February 26 2008 : 4:02:30 PM
You're welcome. (Somebody helped me with the exact same question not all that long ago.)
BKM Posted - February 26 2008 : 3:58:07 PM
[quote]Originally posted by sbubendorf

If the first one didn't work, it looks like I have many examples in the following form that work:

That worked great. Thank You
n/a Posted - February 26 2008 : 1:56:21 PM
If the first one didn't work, it looks like I have many examples in the following form that work:

(ssget "x" (list (cons 0 "INSERT") (cons 2 testvalue)))
n/a Posted - February 26 2008 : 1:50:04 PM
Try this:
(setq ss1 (ssget "X" (List(0 . "INSERT") (2 . testval))))
I'm not sure. I'm searching code now, but thought I'd send this and continue to look. Please reply if you find that it works, so I know whether to continue searching.

The Hurricane Forum © 2009 - 2025 Go To Top Of Page
This page was generated in 0.25 seconds. Snitz Forums 2000