CogoPointCollectionExportPoints(String, PointFileFormat, Boolean, Boolean, Boolean, ObjectId) Method |
Exports points in specified PointGroup to a point file with advanced options.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic static uint ExportPoints(
string pointFileFullName,
PointFileFormat fileFormat,
bool useAdjustedElevation,
bool shouldTransformCoordinate,
bool shouldExpandCoordinateData,
ObjectId pointGroupId
)
Public Shared Function ExportPoints (
pointFileFullName As String,
fileFormat As PointFileFormat,
useAdjustedElevation As Boolean,
shouldTransformCoordinate As Boolean,
shouldExpandCoordinateData As Boolean,
pointGroupId As ObjectId
) As UInteger
public:
static unsigned int ExportPoints(
String^ pointFileFullName,
PointFileFormat^ fileFormat,
bool useAdjustedElevation,
bool shouldTransformCoordinate,
bool shouldExpandCoordinateData,
ObjectId pointGroupId
)
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 PointFileFormatCollection.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.
- pointGroupId ObjectId
- The ObjectId of the PointGroup from which the CogoPoints are exported.
Return Value
UInt32
The count of CogoPoints that are exported.
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- The directory for pointFileFullName does not exist.
- The pointGroupId is invalid.
|
InvalidOperationException |
Thrown when there is an internal error.
|
Remarks- useAdjustedElevation and shouldExpandCoordinateData are disregarded if they are not supported by the specified point file format.
- If the file specified by pointFileFullName already exists, it is overwritten.
- If the file specified by pointFileFullName does not exist, it is created automatically.
- Set the pointGroupId to ObjectId::Null to export all points.
Example 1
2
3string pointFileName = "c:\\tmp\\Example ExportPointsFile - PENZD.txt";
4string pointFileFormatName = "PENZD (space delimited)";
5PointFileFormat pointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)[pointFileFormatName];
6
7
8uint result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat);
9write("# of exported points: " + result + "\n");
10
11
12bool useAdjustedElevation = true;
13bool shouldTransformCoordinate = false;
14bool shouldExpandCoordinateData = true;
15result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, useAdjustedElevation,
16 shouldTransformCoordinate, shouldExpandCoordinateData);
17write("# of exported points: " + result + "\n");
18
19
20ObjectId pointGroupId = _civildoc.PointGroups[0];
21pointFileFormatName = "ENZ (comma delimited)";
22pointFileName = "c:\\tmp\\Example ExportPointsFile - ENZ.csv";
23
24result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, pointGroupId);
25write("# of exported points: " + result + "\n");
26
27
28result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, useAdjustedElevation,
29 shouldTransformCoordinate, shouldExpandCoordinateData, pointGroupId);
30write("# of exported points: " + result + "\n");
1
2
3Dim pointFileName As String = "c:\tmp\Example ExportPointsFile - PENZD.txt"
4Dim pointFileFormatName As String = "PENZD (space delimited)"
5Dim pointFileFormat As PointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)(pointFileFormatName)
6
7
8Dim result As UInteger = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat)
9write("# of exported points: " & result & vbLf)
10
11
12Dim useAdjustedElevation As Boolean = True
13Dim shouldTransformCoordinate As Boolean = False
14Dim shouldExpandCoordinateData As Boolean = True
15result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, useAdjustedElevation, shouldTransformCoordinate, shouldExpandCoordinateData)
16write("# of exported points: " & result & vbLf)
17
18
19Dim pointGroupId As ObjectId = _civildoc.PointGroups(0)
20pointFileFormatName = "ENZ (comma delimited)"
21pointFileName = "c:\tmp\Example ExportPointsFile - ENZ.csv"
22
23result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, pointGroupId)
24write("# of exported points: " & result & vbLf)
25
26
27result = CogoPointCollection.ExportPoints(pointFileName, pointFileFormat, useAdjustedElevation, shouldTransformCoordinate, shouldExpandCoordinateData, pointGroupId)
No code example is currently available or this language may not be supported.
See Also