SelectionSet.Select -> possible FilterData values?

Discussion in 'AutoCAD' started by rjlohan, Jul 29, 2004.

  1. rjlohan

    rjlohan Guest

    Hi,

    Using the SelectionSet.Select method with a filter, what are the possible values I can use for the FilterData parameter?

    I can't find any reference, and I've only seen a couple of examples, so am not sure what's possible here.

    My goal is to be able to change the attributes of every block and block definition in a Drawing. Which I can do, but don't know if it's possible (or how) to grab BlockDefinitions in a SelectionSet? (I can get BlockREferences OK)

    Cheers,
    RJ
     
    rjlohan, Jul 29, 2004
    #1
  2. rjlohan

    rjlohan Guest

    Sorry, this is also referring to when the FilterType = 0 (ObjectType).
     
    rjlohan, Jul 29, 2004
    #2
  3. Have a look at the Entities section of the online DXF referene. You'll find
    it under Help | Developer help.

    SelectionSet objects may only contain drawing entities. Block definitions
    are stored in the BLOCKS table so selection sets are out.

    Fortunately, there is a Blocks collection (ThisDrawing.Blocks) which will
    allow you to traverse all the blocks in the drawing.
     
    Frank Oquendo, Jul 29, 2004
    #3
  4. rjlohan

    Ed Jobe Guest

    As far as a general explanation goes, look in the lisp dev guide under
    filtered selection sets.
     
    Ed Jobe, Jul 29, 2004
    #4
  5. rjlohan

    TomD Guest

    values I can use for the FilterData parameter?
    definition in a Drawing. Which I can do, but don't know if it's possible (or
    how) to grab BlockDefinitions in a SelectionSet? (I can get BlockREferences
    OK)

    Like the others said..........here's one example of functioning code I
    recently needed:

    vCod(0) = 0: vVal(0) = "INSERT"
    vCod(1) = 2: vVal(1) = "*title block*"

    ....which selects all INSERT objects named anything with "title block" in
    them.

    In case you're not familiar with lisp, you can also do the following at the
    command line:

    (entget (car (entsel "\nPick something: ")))

    ...which will return something like this:

    Select object: ((-1 . <Entity name: 7ef62480>) (0 . "VIEWPORT") (330 .
    <Entity
    name: 7ef60d40>) (5 . "158") (100 . "AcDbEntity") (67 . 1) (410 . "30x42")
    (8 .
    "defpoints") (100 . "AcDbViewport") (10 19.5582 26.7174 0.0) (40 . 50.7202)
    (41
    .. 60.1198) (68 . 2) (69 . 2) (12 1.2052e+006 477437.0 0.0) (13 0.0 0.0 0.0)
    (14
    0.5 0.5 0.0) (15 0.5 0.5 0.0) (16 0.0 0.0 1.0) (17 0.0 0.0 0.0) (42 . 50.0)
    (43
    .. 0.0) (44 . 0.0) (45 . 24047.9) (50 . 0.0) (51 . 0.0) (72 . 1000) (90 .
    49216)
    (281 . 0) (71 . 1) (74 . 0) (110 0.0 0.0 0.0) (111 1.0 0.0 0.0) (112 0.0 1.0
    0.0) (79 . 0) (146 . 0.0) (170 . 0))

    ....which is a list of DXF codes and value of the selected object. (Using
    NENTSEL instead ENTSEL will give you access to nested objects.)
     
    TomD, Jul 29, 2004
    #5
  6. rjlohan

    rjlohan Guest

    Thanks all. :)
     
    rjlohan, Aug 2, 2004
    #6
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.