Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSGET with "E"

69 views
Skip to first unread message

Adesu

unread,
Dec 13, 2004, 12:27:40 AM12/13/04
to
I have format formula for ssget with "F" (this below),but for "E" I still
got problem,any help me,thanks.

_$ (setq pt1 '(0.0 0.0 0.0))
(setq pt2 '(5.0 5.0 0.0))
(setq pt3 '(4.0 1.0 0.0))
(setq pt4 '(2.0 6.0 0.0))
(setq ss (ssget "_F" (list pt2 pt3 pt4)))
(setq en (ssname ss 0))
(setq ent (entget en))
(setq entname (cdr (assoc 0 ent)))
(setq entpos (cdr (assoc 10 ent)))
(0.0 0.0 0.0)
(5.0 5.0 0.0)
(4.0 1.0 0.0)
(2.0 6.0 0.0)
<Selection set: c7>
<Entity name: 1484230>
((-1 . <Entity name: 1484230>) (0 . "POINT") (330 . <Entity name: 14840f8>)
(5 . "5E") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 .
"AcDbPoint") (10 3.0 3.5 0.0) (210 0.0 0.0 1.0) (50 . 0.0))
"POINT"
(3.0 3.5 0.0)


Jan van de Poel

unread,
Dec 13, 2004, 9:37:17 AM12/13/04
to
If you look in the 'developer help' under ssget, you'll see that "E" is no
option, ":E" is (remark the colon).
So your code should look like:
(setq ss (ssget ":E" (list pt2 pt3 pt4)))

Regards,
Jan

"Adesu" <mte...@yuasabattery.co.id> schreef in bericht
news:41bd277f_3@newsprd01...

Adesu

unread,
Dec 13, 2004, 7:18:41 PM12/13/04
to
Hi Jan,I still get problem

(setq pt1 '(0.0 0.0 0.0))
(setq pt2 '(5.0 5.0 0.0))
(setq pt3 '(4.0 1.0 0.0))
(setq pt4 '(2.0 6.0 0.0))

(setq ss (ssget ":E" (list pt2 pt3 pt4)))

(setq en (ssname ss 0))
(setq ent (entget en))
(setq entname (cdr (assoc 0 ent)))
(setq entpos (cdr (assoc 10 ent)))
(0.0 0.0 0.0)
(5.0 5.0 0.0)
(4.0 1.0 0.0)
(2.0 6.0 0.0)

; error: bad SSGET list

Jan van de Poel <erg...@nergens.nl> wrote in message
news:41bda8fe_1@newsprd01...

Bill DeShawn

unread,
Dec 13, 2004, 11:12:24 PM12/13/04
to
If your fence hits a space in a dashed line or hits nothing at all, LISP
will return "bad point list")

--
Bill DeShawn
bdes...@nospamsterling.net
http://my.sterling.net~bdeshawn

"Adesu" <mte...@yuasabattery.co.id> wrote in message
news:41bd277f_3@newsprd01...

Jan van de Poel

unread,
Dec 14, 2004, 2:36:12 AM12/14/04
to
Tried and tested your code.
Use F (for fence) instead of :E.
Make sure there are entities within the coordinates you set in pt1 etc.
To be sure there are entities you could use this:
(setq pt1 (getpoint "Enter first corner: "))
(setq pt3 (getpoint "Enter second corner: "))
(setq pt2 (list(car pt3)(cadr pt1)))
(setq pt4 (list (car pt1)(cadr pt3)))
(setq ss (ssget "F" (list pt2 pt3 pt4)))
etc

This should work.

regards,
Jan

"Adesu" <mte...@yuasabattery.co.id> schreef in bericht

news:41be3128_2@newsprd01...

Adesu

unread,
Dec 14, 2004, 3:56:16 AM12/14/04
to
Hi Jan,I still get problem too.

_$ (setq pt1 (getpoint "Enter first corner: "))


(setq pt3 (getpoint "Enter second corner: "))
(setq pt2 (list(car pt3)(cadr pt1)))
(setq pt4 (list (car pt1)(cadr pt3)))

(setq ss (ssget ":E" (list pt2 pt3 pt4)))

(0.0 0.0 0.0)
(5.0 5.0 0.0)

(5.0 0.0)
(0.0 5.0)
; error: bad SSGET list
_$ (setq pt1 (getpoint "Enter first corner: "))


(setq pt3 (getpoint "Enter second corner: "))
(setq pt2 (list(car pt3)(cadr pt1)))
(setq pt4 (list (car pt1)(cadr pt3)))

(setq ss (ssget ":E" (list pt2 pt3 pt4)))

(5.0 5.0 0.0)
(0.0 0.0 0.0)
(0.0 5.0)
(5.0 0.0)
; error: bad SSGET list
_$

Jan van de Poel <erg...@nergens.nl> wrote in message

news:41be97ed$1_3@newsprd01...

Jan van de Poel

unread,
Dec 14, 2004, 6:10:31 AM12/14/04
to

"Adesu" <mte...@yuasabattery.co.id> schreef in bericht
news:41beaa37_2@newsprd01...

> Hi Jan,I still get problem too.

This code works for me:

(setq pt1 (getpoint "Enter first corner: "))

(setq pt3 (getpoint pt1 "Enter second corner: ")) ; added pt1 to get the
'rubber band'


(setq pt2 (list(car pt3)(cadr pt1)))
(setq pt4 (list (car pt1)(cadr pt3)))

(setq ss (ssget "F" (list pt2 pt3 pt4))) ; F for fence, not E


(setq en (ssname ss 0))
(setq ent (entget en))
(setq entname (cdr (assoc 0 ent)))
(setq entpos (cdr (assoc 10 ent)))

What are you trying to achieve with this program?

Regards,
Jan


BillZ

unread,
Dec 14, 2004, 7:12:13 AM12/14/04
to
Adesu,

The :E option limits you to a pick box.

If you want to select entities at a given point use:

(setq ss (ssget "c" pt1 pt1))

;---;

If you want to add fuzz to the selection point.
;---;
(defun a_little_square (p tol)
(list (mapcar '+ p (list tol tol))(mapcar '- p (list tol tol))
)
)

(setq ss (ssget "c" (car box)(cadr box))

HTH

Bill

CAB2k

unread,
Dec 14, 2004, 8:02:37 AM12/14/04
to
From the Help File:
>>>>> :E Everything within the cursor's object selection pickbox.
It is talking about the ACAD pick box you see on the screen as part of the ACAD cursor,
Not a pick box you create. Therefore there is no point list allowed. If you want to
create the pick box use one of the other methods like the CP option.

Adesu

unread,
Dec 14, 2004, 7:41:02 PM12/14/04
to
Hi Jan,BillZ and CAB2k,thanks a lot for your comment,and now I Understand
":E" without entity selection,it only selection by cursor,but the problem is
,after execution my code,in "Visual Lisp Console",this program not automatic
change to AutoCad window,it still in "VLC",you can look icon or symbol as "
This symbol indicates that the VLISP window is no longer active"(Chapter
1 -- Getting Started,Loading and Running AutoLISP Programs on Visual LISP
developers Guide),why like that ?

_$ (setq pt1 '(0.0 0.0 0.0))

(setq pt2 '(5.0 0.0 0.0))
(setq pt3 '(5.0 5.0 0.0))
(setq pt4 '(0.0 5.0 0.0))
(setq ss (ssget ":E"))


(setq en (ssname ss 0))
(setq ent (entget en))
(setq entname (cdr (assoc 0 ent)))
(setq entpos (cdr (assoc 10 ent)))
(0.0 0.0 0.0)

(5.0 0.0 0.0)
(5.0 5.0 0.0)
(0.0 5.0 0.0)
<Selection set: 2>
<Entity name: 1481d88>
((-1 . <Entity name: 1481d88>) (0 . "CIRCLE") (330 . <Entity name: 1481cf8>)
(5 . "49") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 .
"AcDbCircle") (10 5.0 5.0 0.0) (40 . 1.0) (210 0.0 0.0 1.0))
"CIRCLE"
(5.0 5.0 0.0)
_$

CAB2k <nos...@address.withheld> wrote in message
news:28868968.110302938...@jiveforum2.autodesk.com...

BillZ

unread,
Dec 15, 2004, 7:58:56 AM12/15/04
to
>>>Hi Jan,BillZ and CAB2k,thanks a lot for your comment,and now I Understand
":E" without entity selection,it only selection by cursor<<<

If you want just one pick add :S
(ssget ":E:S")

Saves you from hitting enter after one pick.

Don't know about the VLC. I never use it.

Bill

CAB2k

unread,
Dec 15, 2004, 8:20:39 AM12/15/04
to
In ACAD2000 mine works that way too, you must change the window yourself.
Just click on the ACAD icon.

For more info on ssget filters go here
http://www.smadsen.com/

Look for the tutorial on ssget


And come visit us at the http://theswamp.org/phpBB2/

Bill DeShawn

unread,
Dec 16, 2004, 1:18:21 AM12/16/04
to

What purpose the colon (:)?

"Adesu" <mte...@yuasabattery.co.id> wrote in message

news:41beaa37_2@newsprd01...

Bill DeShawn

unread,
Dec 16, 2004, 1:16:23 AM12/16/04
to
Change your "getpoint" to "getcorner" for a rectangular "rubber band".

"Jan van de Poel" <erg...@nergens.nl> wrote in message
news:41beca29_3@newsprd01...

Bill DeShawn

unread,
Dec 16, 2004, 1:28:58 AM12/16/04
to
I checked the help file. Odd option. No wonder I got an error yesterday
with (ssget "e"). Actuall it was "too few arguments". So, it looks like
that's another option that I can't find an explanation for on my own. "e"
and ":E" appear to be two valid options.
The plot thickens.

"Bill DeShawn" <bdes...@nospamsterling.net> wrote in message
news:41c128e8_1@newsprd01...

BillZ

unread,
Dec 16, 2004, 8:27:51 AM12/16/04
to
And to complicate matters:

(ssget "+.:E:S")

Whats the "+." for?

Was given to me on this forum but I can't remember now.
Was it Tony Tanzillo or Michael Puckett....mmmm.
IIRC: They said they found it in some developers guide (not lisp).


Bill

R. Robert Bell

unread,
Dec 17, 2004, 10:35:29 AM12/17/04
to
Tony told all... the "+." puts (ssget) into "point" mode. It helps the ":S"
single-mode act just like (entsel) by avoiding implied selection windows.

--
R. Robert Bell


"BillZ" <nos...@address.withheld> wrote in message
news:12349639.110320370...@jiveforum2.autodesk.com...

BillZ

unread,
Dec 17, 2004, 12:13:56 PM12/17/04
to
Thanks Robert,

i must've missed that.

Bill

Bill DeShawn

unread,
Dec 30, 2004, 9:54:02 AM12/30/04
to
Oh, OK. I have been using (entsel) for one pick.

"BillZ" <nos...@address.withheld> wrote in message
news:14265639.110311556...@jiveforum1.autodesk.com...

0 new messages