Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SSGET Function

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
440 Views, 2 Replies

SSGET Function

Hello all,  I couldn't see what the  problem with the following line of code is, I wanted to erase text objects in a certain area using the ssget function with a fence. the x coordinates of the fence are 6.18347 and 9.36639 but the y coordinate of the fence varies, so i used a variable 'Y_DIFF' with an int value which would be an input by the user.But when I try the code it says "error: too many arguments"
Here is the code

 

(setq eraseTxt (ssget "_F" '((LIST 6.18347 (- 1.14754 Y-DIFF)) (LIST 9.36639 (- 1.14754 Y-DIFF))) '((0 . "TEXT"))))

 

Thanks in advance for your help

2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

.... 

(setq eraseTxt (ssget "_F" '((LIST 6.18347 (- 1.14754 Y-DIFF)) (LIST 9.36639 (- 1.14754 Y-DIFF))) '((0 . "TEXT"))))

 

....

You can't start a list with an apostrophe [= (quote) function] unless there's nothing inside it that requires evaluation, but it can all be read "literally."  Your Y-DIFF variable is something that it needs to evaluate.  Try:

 

(setq eraseTxt (ssget "_F" (list (LIST 6.18347 (- 1.14754 Y-DIFF)) (LIST 9.36639 (- 1.14754 Y-DIFF))) '((0 . "TEXT"))))

 

Kent Cooper, AIA
Message 3 of 3
Anonymous
in reply to: Kent1Cooper

Thanks Kent it worked great!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta