Imports points from a point file.

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

Syntax

C#
public static uint ImportPoints(
	string pointFileFullName,
	PointFileFormat fileFormat
)
Visual Basic
Public Shared Function ImportPoints ( _
	pointFileFullName As String, _
	fileFormat As PointFileFormat _
) As UInteger
Visual C++
public:
static unsigned int ImportPoints(
	String^ pointFileFullName, 
	PointFileFormat^ fileFormat
)

Parameters

pointFileFullName
Type: System..::..String
The full path and name of the point file.
fileFormat
Type: Autodesk.Civil.DatabaseServices..::..PointFileFormat
The file format for the point file. You can get a collection of supported point file formats by using PointFileFormatCollection.GetPointFileFormats().

Return Value

The count of CogoPoints that were imported.

Examples

CopyC#
1// This point file is included as a sample for Civil 3D tutorials:
2string pointFilePath = @"C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Help\Civil Tutorials\";
3string pointFileName = pointFilePath + "Existing Ground Points - PENZD.txt";
4string pointFileFormatName = "PENZD (space delimited)";
5PointFileFormat pointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)[pointFileFormatName];
6
7uint result = CogoPointCollection.ImportPoints(pointFileName, pointFileFormat);
8write("Successfully imported " + result + " points\n");
CopyVB.NET
1' This point file is included as a sample for Civil 3D tutorials:
2Dim pointFilePath As String = "C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Help\Civil Tutorials\"
3Dim pointFileName As String = pointFilePath & "Existing Ground Points - PENZD.txt"
4Dim pointFileFormatName As String = "PENZD (space delimited)"
5Dim pointFileFormat As PointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)(pointFileFormatName)
6
7Dim result As UInteger = CogoPointCollection.ImportPoints(pointFileName, pointFileFormat)
8write("Successfully imported " & result & " points" & vbLf)

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. The pointFileFullName does not exist.
  2. The point file content doesn't match the specified point file format.

See Also