[ORD C#] TerrainSurface units

Hi,

I am trying to see if our features have been placed over a TerrainSurface. To do this, I need to read the geometry of the surface.

It all works, however there seems to be a units issue. The steps to reproduce are below.

1. Open drawing with TerrainSurface in. When I open the drawing it is in "US Survey Feet". 

2. Run the following code. Range (and returned verticies too) returns Min X of 2560.

TerrainSurface Surface = GetFirstSurfaceFromDrawing();
DTM bentleyTerrain = Surface.DTM;
var range3d = bentleyTerrain.Range3d;

3. Change the Units of the drawing via the Utilities Ribbon to Metres.

4. Re-run the above code. The values returned are still the same. 

When I look at the geometry that we are testing against, the Range / geometry changes when the units change. The surface range/ geometry does not.

Is there any way to find the insertion units of the Surface or can anyone suggest an alternative way of doing things?

Many Thanks,

Joe

Parents Reply Children
No Data