selection set filters

Discussion in 'AutoCAD' started by chuck, Nov 4, 2004.

  1. chuck

    chuck Guest

    I would like to create a selection set of Radial only dimensions. How do I
    go about this. The return value for radial dimensions assoc 100 is (100 .
    "AcDbEntity") not the (100 . "AcDbRadialDimension") association I require.
    I've tried to cdr through the entity list by using a conditional loop (while
    (/= (car entlist) (cons 100 "AcDbRadialDimension"))(progn (setq entlist (cdr
    entlist)))) thinking that I could use ssadd here but the assoc (100 .
    "AcDbRadialDimension") appears to not be equal to (cons 100
    "AcDbRadialDimension") for some reason. Even if I use (cdr(car entlist)) it
    does not equal "AcDbRadialDimension" and the condition is never satisfied.
    Is there something I'm missing?
     
    chuck, Nov 4, 2004
    #1
  2. chuck

    Jeff Guest

    In your filter list, filter on the logical bitwise AND of code 70 for
    4......the following will get ALL Radial Dimensions in the drawing:

    (setq ss (ssget "x" '((0 . "DIMENSION")(-4 . "&")(70 . 4))))
     
    Jeff, Nov 4, 2004
    #2
  3. chuck

    chuck Guest

    are there similar functions for diametric and angular dimensions?
     
    chuck, Nov 4, 2004
    #3
  4. chuck

    Jeff Guest

    Yes, look into the DXF Reference Manual for the Dimension Entities. See what
    the values are for the different type dimensions under the 70 group code.
    From memory: 0 is Linear, 1 is Aligned, 2 is 'forget', 4 is Radial, 8 is
    'forget' and 16 is 'forget'......hmmm only remember 50%, not good. Oh well,
    that's why we have manuals ;-) ,but I don't have one available right now and
    the wife wants to watch a movie......
     
    Jeff, Nov 4, 2004
    #4
  5. chuck

    Jeff Guest

    OK, so my memory is horrible tonight......here's the description of the 70
    Group code:

    Dimension type.
    Values 0-6 are integer values that represent the dimension type. Values 32,
    64, and 128 are bit values, which are added to the integer values (value 32
    is always set in R13 and later releases).
    0 = Rotated, horizontal, or vertical; 1 = Aligned;
    2 = Angular; 3 = Diameter; 4 = Radius;
    5 = Angular 3 point; 6 = Ordinate;
    32 = Indicates that the block reference (group code 2) is referenced by this
    dimension only.
    64 = Ordinate type. This is a bit value (bit 7) used only with integer value
    6. If set, ordinate is X-type; if not set, ordinate is Y-type.
    128 = This is a bit value (bit 8) added to the other group 70 values if the
    dimension text has been positioned at a user-defined location rather than at
    the default location

    You will have to play around a bit to get the results you need, since I got
    lucky with the radial in that it used an Integer that could have been a
    bitwise number........will toy with this tomorrow if you haven't figured it
    out yet.
     
    Jeff, Nov 4, 2004
    #5
  6. chuck

    chuck Guest

    Many thanks Jeff. you've been a great help. Where do you learn all this
    stuff anyway? I've been studying this for hours without much luck. I've been
    trying to teach myself autolisp, and so far, so good. One thing I have come
    to discover though, is that the more you learn the more you realize you know
    nothing. Thanks again.
     
    chuck, Nov 5, 2004
    #6
  7. In life as in LISP....<princ>
     
    Michael Bulatovich, Nov 5, 2004
    #7
  8. chuck

    Jeff Guest

    You're welcome Chuck!
    As far as learning, I just did what you are now doing.....lots of trial &
    error....reading the help, newsgroups and forums....spending more spare time
    on the computer than I care to admit.

    I couldn't agree more on the "don't know nothin'" part. I am still
    constantly learning from others' work.

    Good Luck,
    Jeff
     
    Jeff, Nov 5, 2004
    #8
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.