Exports the surface to a DEM file, with an optional custom value for null elevation.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 10.3.488.0

Syntax

C#
public void ExportToDEM(
	string fileName,
	string coordinateSystemCode,
	double gridSpacing,
	ExportDetermineElevationType deteElevBy,
	bool useCustomNullElevationation,
	float customNullElevation
)
Visual Basic
Public Sub ExportToDEM ( _
	fileName As String, _
	coordinateSystemCode As String, _
	gridSpacing As Double, _
	deteElevBy As ExportDetermineElevationType, _
	useCustomNullElevationation As Boolean, _
	customNullElevation As Single _
)
Visual C++
public:
void ExportToDEM(
	String^ fileName, 
	String^ coordinateSystemCode, 
	double gridSpacing, 
	ExportDetermineElevationType deteElevBy, 
	bool useCustomNullElevationation, 
	float customNullElevation
)

Parameters

fileName
Type: System..::..String
The full file path of the DEM file.
coordinateSystemCode
Type: System..::..String
The coordinate zone of the exported surface, using a Map Zone name.
gridSpacing
Type: System..::..Double
The horizontal spacing for the DEM profile points.
deteElevBy
Type: Autodesk.Civil..::..ExportDetermineElevationType
Specifies how the elevations of DEM file are determined from the exported surface.
useCustomNullElevationation
Type: System..::..Boolean
Specifies whether to use a custom value for null elevation.
customNullElevation
Type: System..::..Single
Specifies the default value for null elevation.

Remarks

  1. If the target DEM file exists, its contents are deleted. If the method fails, the existing file will be empty.
  2. If the drawing has a coordinate system defined, the export uses that drawing coordinate system, and the coordinateSystemCode parameter is ignored.

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. The fileName is empty.
  2. The coordinateSystemCode is empty.
  3. The gridSpacing is less than or equal to 0.0.
  4. The customNullElevation is less than or equal to 0.0 when useCustomNullElevationation is true.
  5. The coordinateSystemCode is not supported.
  6. The target DEM file already exists and is not writable.
System..::..InvalidOperationException Thrown when there is an Internal error.

See Also