Where to find a particular dimstyle override

Discussion in 'AutoCAD' started by chrisb, Sep 16, 2004.

  1. chrisb

    chrisb Guest

    I once wrote a real quick & dirty bit of code that allows me to pick an existing dimension to set the current dimstyle. It's easily obtained via entget & entsel, but apparently I need to look elsewhere for any dimstyle overrides that are applied to a picked dimension. The reason I want to be able to do this is just a tad hard to explain, but I will if prompted.
    -How, or where would I get this data, so I can improve my little routine? Any insight would be greatly appreciated.
     
    chrisb, Sep 16, 2004
    #1
  2. I'm no expert when it comes to xdata, but that
    is what you need to examine.

    Command: (entget (car (entsel)) '("acad"))

    Select object: ((-1 . <Entity name: 77757130>) (0 . "DIMENSION") (330 .
    <Entity
    name: 7c804c98>) (5 . "27DE") (100 . "AcDbEntity") (67 . 1) (410 . "TS32")
    (8 .
    "S-DIMS") (100 . "AcDbDimension") (2 . "*D57") (10 23.9543 11.8351 0.0) (11
    22.8365 11.9319 0.0) (12 0.0 0.0 0.0) (70 . 32) (1 . "") (71 . 5) (72 . 1)
    (41
    .. 1.0) (42 . 26.8285) (52 . 0.0) (53 . 0.0) (54 . 0.0) (51 . 0.0) (210 0.0
    0.0
    1.0) (3 . "Atr_12$0") (100 . "AcDbAlignedDimension") (13 21.7186 11.1436
    0.0)
    (14 23.9543 11.1436 0.0) (15 0.0 0.0 0.0) (16 0.0 0.0 0.0) (40 . 0.0) (50 .
    0.0) (100 . "AcDbRotatedDimension") (-3 ("ACAD" (1000 . "DSTYLE") (1002 .
    "{")
    (1070 . 281) (1070 . 1) (1002 . "}"))))


    --
    Autodesk Discussion Group Facilitator



    existing dimension to set the current dimstyle. It's easily obtained via
    entget & entsel, but apparently I need to look elsewhere for any dimstyle
    overrides that are applied to a picked dimension. The reason I want to be
    able to do this is just a tad hard to explain, but I will if prompted.
    Any insight would be greatly appreciated.
     
    Jason Piercey, Sep 16, 2004
    #2
  3. chrisb

    chrisb Guest

    Ah! THERE it is. I just ran that code on my DIMSCALE over-ridden dimension, and a code '1040' showed up in the list indicating the dimscale override of 12.1 (next to last item in list) :
    ((-1 . <Entity name: 40cc4158>) (0 . "DIMENSION") (5 . "41BB")
    (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 40cc41c8>) (102 . "}") (102 .
    "{ACAD_REACTORS") (330 . <Entity name: 40cc4220>) (102 . "}") (330 . <Entity
    name: 4023ccf8>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "Dim-Ref")
    (100 . "AcDbDimension") (2 . "*D82") (10 -195.0 -10.8125 0.0) (11 -195.0 -0.5
    0.0) (12 0.0 0.0 0.0) (70 . 160) (1 . "") (71 . 5) (72 . 1) (41 . 1.0) (42 .
    15.0) (52 . 0.0) (53 . 0.0) (54 . 0.0) (51 . 0.0) (210 0.0 0.0 1.0) (3 .
    "Fraction$0") (100 . "AcDbAlignedDimension") (13 -204.938 4.1875 0.0) (14
    -197.063 -10.8125 0.0) (15 0.0 0.0 0.0) (16 0.0 0.0 0.0) (40 . 0.0) (50 .
    1.5708) (100 . "AcDbRotatedDimension") (-3 ("ACAD" (1000 . "DSTYLE") (1002 .
    "{") (1070 . 40) (1040 . 12.1) (1002 . "}"))))

    Wondereful! Now I can complete my code. -Many thanks!
    -Chris
     
    chrisb, Sep 17, 2004
    #3
  4. Glad I could help, Chris.
     
    Jason Piercey, Sep 17, 2004
    #4
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.