[Connect NET vs Interop] Range and Origin results don't make sense comparing to drawing

I think I have a headache trying to figure out how to get the range and origin results consistently. For example here are results from the same textElement but accessing the range from different APIs:

Interop - OpenDesignFileForProgram

Range.High.X = 1198162.033

Interop - OpenDesignFile

Range.High.X = 5.77

.NET on Active Design File

CalElementRange.X = 1198162060

.NET on Loaded Design File

CalElementRange.X = 1198162060

Properties examining in the DGN

Origin.X = 5IN 5TN so that looks to match the Range.High.X of the OpenDesignFile in Interop

UOR = 0.000393700787401

With that, I see some correlation between the Interop OpenDesignFileForProgram and NET results, X1000, but i don't understand how i interpret that value to 5.7... Any help to understand this madness is appreciated.

Parents Reply
  • if you take the point data from either CalcRange or GetSnapOrigin and divide it by ModelUOR

    When MU:SU are metric, yes.

    But, apparently that's not happening on some of these files for whatever reason.

    It's hard to say without sharing the file, because I can imagine more reasons why range is not as expected:

    • Range is fixed (pre-calculated) value, so maybe it was calculated wrongly. Using fixrange utility should help there.
    • Range is correct, but looks like not: Can happen in complicated elements, where range was calculated for some "hidden" element.
    • Maybe there is model origin shift (even when I think it should not cause any problem).
    • GCS is assigned?
    • ...
    I'm probably going to just go with these large numbers for my purpose.

    There are only a few "typical"reasons, why to access element range information:

    • Scanning for elements in specific area
    • Analysis of an "element touches themselves" (or similar tasks), when the first step is, again, scanning based on range.

    With regards,


No Data