Results 1 to 4 of 4

Thread: filters in lisp/scripts?

  1. #1
    AUGI Addict
    Join Date
    2003-04
    Location
    Scotland
    Posts
    1,577
    Login to Give a bone
    0

    Default filters in lisp/scripts?

    Using Revit and Autocad in our office, and have automated some of the tasks we need to do regularly to get the exported DWG Files into a format we need - using a fairly simple lisp routine...

    I can do everything apart from filter out the all the "SOLID" hatch for deletion and have to do this manually each time, there isnt a "-filter" to make it usable through lisp, ie it only works in the dialogue box as far as I can tell. Is there a simple way to do this using lisp or scripts - I suspect there probably isnt? Its not hugely important, but I just wondered how you lisp gurus do actually filter stuff out?
    Last edited by Martin P; 2004-06-23 at 01:39 PM.

  2. #2
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: filters in lisp/scripts?

    see ssget function in AutoLISP Reference help

    this function will let you Select Objects useing a filter

  3. #3
    I could stop if I wanted to
    Join Date
    2003-05
    Posts
    335
    Login to Give a bone
    0

    Default Re: filters in lisp/scripts?

    Martin,

    Yes there are ways to filter out different items in selection sets:

    (setq ss (ssget '((0 . "HATCH")(2 . "SOLID"))))

    collects all the solid hatches and nothing else. You can use conditionals to filter things using and, or, not, etc. Also you can use wildcards. Review the visual lisp help files for more examples.

  4. #4
    AUGI Addict
    Join Date
    2003-04
    Location
    Scotland
    Posts
    1,577
    Login to Give a bone
    0

    Default Re: filters in lisp/scripts?

    excellent, thank you for that and I will have a look at ssget

Similar Threads

  1. Replies: 6
    Last Post: 2021-09-17, 06:21 PM
  2. View Filters Overriding Phase Filters
    By tracyt in forum Revit MEP - General
    Replies: 1
    Last Post: 2012-03-02, 12:59 AM
  3. Reactor lisp filters?
    By Chris.N in forum AutoLISP
    Replies: 6
    Last Post: 2010-03-15, 03:56 PM
  4. Macros Lisp and Scripts
    By cad.192369 in forum AutoCAD Customization
    Replies: 5
    Last Post: 2008-11-07, 01:20 PM
  5. Scripts/LISP and read only dwg's
    By mnelson.92099 in forum AutoLISP
    Replies: 3
    Last Post: 2006-08-23, 09:23 AM

Posting Permissions

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