Jump to content

ssget a variable list Question


sean112

Recommended Posts

When I use ssget before, I either let user input, or '(1000 1000) for a fixed point.

 

Now, I have an variable as a point.

 

The code now looks like this:

 

(command "copyclip" (ssget "W" 'pointy1 'pointy2 ""))

 

Pointy1 and pointy2 are a list which changes when a flag changes.

Here is pointy1's value (3600 3400).

I understand the apostrophe tells lisp not to evaluate pointy1 and pointy2.

But when I execute the command above, it shows bad point argument, and if I do not include the apostrophe, it shows too many arguments.:unsure::cry:

 

Is there any way for me to use a variable to run ssget? Or do I have to put a point like '(1000 1000)

 

Thanks for any reply!

Link to comment
Share on other sites

Try this:

(ssget "_W" pointy1 pointy2)

 

I just tried it; I saw the object is selected, but there is still an error message saying

 

"*Invalid selection*

Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/Previous/Undo/AUto/SIngle

; error: Function cancelled"

 

and since I took out "" it did not end the copyclip command.

 

It is already a huge improvement though!!:D

Link to comment
Share on other sites

This is the complete one:

(command "_.copyclip" (ssget "_W" pointy1 pointy2) "")

 

I just realized I am retarded. LOL

I put the "" inside the ssget.

 

Thanks so much, Tharwat!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...