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. |