+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
  1. #1
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default Selection set from list

    Registered forum members do not see this ad.

    I'm trying to get a selection set from a list.The selection I would like is assoc 301 from this.I have a start I think,but no go.

    Code:
    (setq aa (entget "x" '((0 . "MAPS_SOLID" (301 . "on")))
    Code:
     
    Select object: ((-1 . <Entity name: 7ffff808470>) (0 . "MAPS_SOLID") (330 . 
    <Entity name: 7ffff803e50>) (5 . "607") (100 . "AcDbEntity") (67 . 0) (410 . 
    "Model") (8 . "M-SALP-GVDU-REC") (8 . "M-SALP-GVDU-REC") (300 . "TRANS HOLE") 
    (300 . "None") (300 . "Not Set") (300 . "Galvanized") (300 . "24") (300 . "24") 
    (300 . "24 (inch)") (300 . "0") (300 . "") (300 . "") (306 . "On") (305 . "On") 
    (301 . "On"))

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    Look into the ssget function.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default

    (ssget "x" '((0 . "MAPS_SOLID" )(301 . "on")))

    I had tried that before.Will keep looking

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    That should be correct - providing you have the correct data in the Filter list.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default

    That second code field up top was a (entget(car(entsel))).It's returning nil and not highlighting the object

    This will create the selection but not filter enough
    (sssetfirst nil (ssget "_X" '((0 . "MAPS_SOLID"))))

    This for some reason will not
    (sssetfirst nil (ssget "_X" '((0 . "MAPS_SOLID")(301."on"))))
    Last edited by Accoes; 20th May 2010 at 07:49 pm. Reason: add entries

  6. #6
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882

    Default

    How about this?

    Code:
    (sssetfirst nil (ssget "_X" '((0 . "MAPS_SOLID")(301 . "On"))))
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  7. #7
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default

    Bingo....That space was causing the headache.

    Thanks for the help.I have another question and tried to look it up but could not figure away to put it in a search.The apostrophe after the "_x".What does that tell
    it?
    Last edited by Accoes; 20th May 2010 at 09:49 pm.

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,882
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  9. #9
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default

    Just to clarify,it was not a space but a lower case string.

  10. #10
    Full Member
    Using
    Mechanical 2009
    Join Date
    Dec 2008
    Posts
    25

    Default

    Registered forum members do not see this ad.

    In the first post in the second code section ,I would like to filter with one of the associate 300 series.Is it posible to choose one when there are several or do you have to parse them out?

Similar Threads

  1. How to remove a block from the block selection list
    By salmonrose in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 26th Jan 2010, 08:55 pm
  2. write a list into text file and return back as list
    By muthu123 in forum AutoLISP, Visual LISP & DCL
    Replies: 14
    Last Post: 21st Dec 2009, 04:31 pm
  3. Make Popup List remember last selection
    By The Buzzard in forum AutoLISP, Visual LISP & DCL
    Replies: 10
    Last Post: 29th May 2009, 10:43 pm
  4. delay in selection of objects/selection windows
    By RedRobMol in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 31st May 2005, 01:34 pm
  5. Foobar to list selection methods
    By hyposmurf in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 22nd Jul 2003, 10:50 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts