CogoPointCollectionImportPoints(String, PointFileFormat, Boolean, Boolean, Boolean) Method |
Imports points from a point file with advanced options.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic static uint ImportPoints(
string pointFileFullName,
PointFileFormat fileFormat,
bool useAdjustedElevation,
bool shouldTransformCoordinate,
bool shouldExpandCoordinateData
)
Public Shared Function ImportPoints (
pointFileFullName As String,
fileFormat As PointFileFormat,
useAdjustedElevation As Boolean,
shouldTransformCoordinate As Boolean,
shouldExpandCoordinateData As Boolean
) As UInteger
public:
static unsigned int ImportPoints(
String^ pointFileFullName,
PointFileFormat^ fileFormat,
bool useAdjustedElevation,
bool shouldTransformCoordinate,
bool shouldExpandCoordinateData
)
Parameters
- pointFileFullName String
- The full path and name of the point file.
- fileFormat PointFileFormat
- The file format for the point file. You can get a collection of supported point file formats by using GetPointFileFormats.
- useAdjustedElevation Boolean
- Specifies whether to adjust the point elevation values.
- shouldTransformCoordinate Boolean
- Specifies whether to transform the points in the file.
- shouldExpandCoordinateData Boolean
- Specifies whether to calculate the coordinate data properties of the points, such as degrees, minutes, seconds, and hemisphere for latitude and longitude.
Return Value
UInt32
The count of CogoPoints that were imported.
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- The pointFileFullName does not exist.
- The point file content doesn't match the specified point file format.
|
Remarks
useAdjustedElevation and shouldExpandCoordinateData are disregarded if they are not supported by the specified point file format.
Example 1
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];
6bool useAdjustedElevation = true;
7bool shouldTransformCoordinate = true;
8bool shouldExpandCoordinateData = true;
9
10uint result = CogoPointCollection.ImportPoints(pointFileName, pointFileFormat,
11 useAdjustedElevation, shouldTransformCoordinate, shouldExpandCoordinateData);
12write("Successfully imported " + result + " points\n");
1
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)
6Dim useAdjustedElevation As Boolean = True
7Dim shouldTransformCoordinate As Boolean = True
8Dim shouldExpandCoordinateData As Boolean = True
9
10Dim result As UInteger = CogoPointCollection.ImportPoints(pointFileName, pointFileFormat, useAdjustedElevation, shouldTransformCoordinate, shouldExpandCoordinateData)
11write("Successfully imported " & result & " points" & vbLf)
No code example is currently available or this language may not be supported.
See Also