selecting one entity

Discussion in 'AutoCAD' started by martin, Aug 11, 2003.

  1. martin

    martin Guest

    I have a lisp which selects some polylines then performs some actions on
    them one by one, what i do is use the (ssget+sslenght+ssname) then (ssget)
    again to select one item with the filter set to use the entity name code
    (-1), but i get a nul selection set, what is wrong with the code and ae
    there other methods to do that
    (ssget+sslenght+ssname+entget)
    (setq b (assoc -1 (objectlist)) ,everything is fine till here

    (setq b1 (ssget "X" (list b))) ,returns nul
    ,which means i can not perform a command on the previous set supposed to
    have been created in the previous step
    (command "whatever" "p")

    ,and it does work if i would choose (setq b (assoc 8 (objectlist)), but
    then i get many objects in the selection set instead of only one
    any idea's.
    martin
     
    martin, Aug 11, 2003
    #1
  2. martin

    David Bethel Guest

    Martin,

    -1 enames won't work with ssget, but then why?

    If you really need a selection set, then

    (setq b1 (ssadd))
    (ssadd b1 b)

    (ssget "P") works on Previsous

    Why can't you feed the ename directly to the function?


    -David
     
    David Bethel, Aug 11, 2003
    #2
  3. You can't use -1 group code in a ssget filter.

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 11, 2003
    #3
  4. martin

    martin Guest

    i have tried the (ssadd) to create a new selection set of one object from
    the main selection set but still "P" refers to main set if i use the command
    "move" "p"
    martin
     
    martin, Aug 12, 2003
    #4
  5. martin

    Mark Propst Guest

    if you're saying you did this
    (setq setx(ssadd))
    (setq setx(ssadd entx setx))
    then you could do this
    "move" setx
    or if you just wanted to move entx why not
    "move" entx
     
    Mark Propst, Aug 12, 2003
    #5
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.