SurfaceDefinitionPointFilesAddPointFile(String, PointFileFormat, Boolean, Boolean, Boolean) Method |
Adds the point file to the surface.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic SurfaceOperationAddPointFile AddPointFile(
string pointFilename,
PointFileFormat pointFileFormat,
bool useAdjustedElevation,
bool shouldTransformPointCoordinate,
bool shouldExpandCoordinateData
)
Public Function AddPointFile (
pointFilename As String,
pointFileFormat As PointFileFormat,
useAdjustedElevation As Boolean,
shouldTransformPointCoordinate As Boolean,
shouldExpandCoordinateData As Boolean
) As SurfaceOperationAddPointFile
public:
SurfaceOperationAddPointFile^ AddPointFile(
String^ pointFilename,
PointFileFormat^ pointFileFormat,
bool useAdjustedElevation,
bool shouldTransformPointCoordinate,
bool shouldExpandCoordinateData
)
Parameters
- pointFilename String
- The full path of the point file.
- pointFileFormat 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.
- shouldTransformPointCoordinate 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
SurfaceOperationAddPointFile
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when:
- The point file content doesn't match the specified point file format.
|
Remarks
The shouldExpandCoordinateData and useAdjustedElevation value are ignored if they are not supported in the point file format.
Example 1
2
3ObjectId surfaceId = TinSurface.Create(_acaddoc.Database, "Example Surface");
4TinSurface surface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
5
6
7string pointFilePath = @"C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Help\Civil Tutorials\";
8string pointFileName = pointFilePath + "Existing Ground Points - PENZD.txt";
9string pointFileFormatName = "PENZD (space delimited)";
10PointFileFormat pointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)[pointFileFormatName];
11
12surface.PointFilesDefinition.AddPointFile(pointFileName, pointFileFormat);
13
14
15
16
17surfaceId = TinSurface.Create(_acaddoc.Database, "Example Surface 2");
18surface = surfaceId.GetObject(OpenMode.ForWrite) as TinSurface;
19pointFileName = pointFilePath + "LIDAR_ENZ (comma delimited).csv";
20pointFileFormatName = "ENZ (comma delimited)";
21pointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)[pointFileFormatName];
22bool useAdjustedElevation = true;
23bool shouldTransformPointCoordinate = false;
24bool shouldExpandCoordinateData = false;
25surface.PointFilesDefinition.AddPointFile(pointFileName, pointFileFormat,
26 useAdjustedElevation, shouldTransformPointCoordinate, shouldExpandCoordinateData);
1
2
3Dim surfaceId As ObjectId = TinSurface.Create(_acaddoc.Database, "Example Surface")
4Dim surface As TinSurface = TryCast(surfaceId.GetObject(OpenMode.ForWrite), TinSurface)
5
6
7Dim pointFilePath As String = "C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\Help\Civil Tutorials\"
8Dim pointFileName As String = pointFilePath & "Existing Ground Points - PENZD.txt"
9Dim pointFileFormatName As String = "PENZD (space delimited)"
10Dim pointFileFormat As PointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)(pointFileFormatName)
11
12surface.PointFilesDefinition.AddPointFile(pointFileName, pointFileFormat)
13
14
15
16
17surfaceId = TinSurface.Create(_acaddoc.Database, "Example Surface 2")
18surface = TryCast(surfaceId.GetObject(OpenMode.ForWrite), TinSurface)
19pointFileName = pointFilePath & "LIDAR_ENZ (comma delimited).csv"
20pointFileFormatName = "ENZ (comma delimited)"
21pointFileFormat = PointFileFormatCollection.GetPointFileFormats(_acaddoc.Database)(pointFileFormatName)
22Dim useAdjustedElevation As Boolean = True
23Dim shouldTransformPointCoordinate As Boolean = False
24Dim shouldExpandCoordinateData As Boolean = False
No code example is currently available or this language may not be supported.
See Also