SSGET with "E"

Discussion in 'AutoCAD' started by Adesu, Dec 13, 2004.

  1. Adesu

    Adesu Guest

    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)
     
    Adesu, Dec 13, 2004
    #1
  2. 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
     
    Jan van de Poel, Dec 13, 2004
    #2
  3. Adesu

    Adesu Guest

    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
     
    Adesu, Dec 14, 2004
    #3
  4. Adesu

    Bill DeShawn Guest

    If your fence hits a space in a dashed line or hits nothing at all, LISP
    will return "bad point list")
     
    Bill DeShawn, Dec 14, 2004
    #4
  5. 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
     
    Jan van de Poel, Dec 14, 2004
    #5
  6. Adesu

    Adesu Guest

    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
    _$
     
    Adesu, Dec 14, 2004
    #6
  7. 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
     
    Jan van de Poel, Dec 14, 2004
    #7
  8. Adesu

    BillZ Guest

    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
     
    BillZ, Dec 14, 2004
    #8
  9. Adesu

    CAB2k Guest

    From the Help File: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.
     
    CAB2k, Dec 14, 2004
    #9
  10. Adesu

    Adesu Guest

    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)
    _$
     
    Adesu, Dec 15, 2004
    #10
  11. Adesu

    BillZ Guest

    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
     
    BillZ, Dec 15, 2004
    #11
  12. Adesu

    CAB2k Guest

    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/
     
    CAB2k, Dec 15, 2004
    #12
  13. Adesu

    Bill DeShawn Guest

    Change your "getpoint" to "getcorner" for a rectangular "rubber band".
     
    Bill DeShawn, Dec 16, 2004
    #13
  14. Adesu

    Bill DeShawn Guest

    What purpose the colon :))?
     
    Bill DeShawn, Dec 16, 2004
    #14
  15. Adesu

    Bill DeShawn Guest

    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, Dec 16, 2004
    #15
  16. Adesu

    BillZ Guest

    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
     
    BillZ, Dec 16, 2004
    #16
  17. 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


    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, Dec 17, 2004
    #17
  18. Adesu

    BillZ Guest

    Thanks Robert,

    i must've missed that.

    Bill
     
    BillZ, Dec 17, 2004
    #18
  19. Adesu

    Bill DeShawn Guest

    Oh, OK. I have been using (entsel) for one pick.
     
    Bill DeShawn, Dec 30, 2004
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.