shp文件转换到CAD dwg,dxf
''' <summary>
''' Features 转换到CAD文件
''' </summary>
''' <param name="in_features">输入文件路径</param>
''' <param name="Output_File">输出文件路径</param>
''' <param name="Output_Type">输出类型</param>
''' <param name="Ignore_FileNames"></param>
''' <remarks></remarks>
Public Sub feature2CAD(ByVal in_features As String, ByVal Output_File As String, Optional ByRef Ignore_FileNames As Boolean = True)
Try
Dim gp As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor()
Dim pExptoCAD As ExportCAD = New ExportCAD()
pExptoCAD.in_features = in_features
pExptoCAD.Output_File = Output_File
pExptoCAD.Output_Type = "DWG_R2004"
pExptoCAD.Append_To_Existing = True
pExptoCAD.Ignore_FileNames = True
Dim result As IGeoProcessorResult
result = gp.Execute(pExptoCAD, Nothing)
If result Is Nothing Then
MsgBox("转换失败,请检查参数是否正确!")
Else
If result.Status = esriJobStatus.esriJobSucceeded Then
MsgBox("文件生成成功!")
End If
End If
Catch ex As Exception
MsgBox(ex.Message + "转换失败,请检查参数是否正确!")
End Try
End Sub
发布者:admin,转转请注明出处:http://www.yc00.com/news/1692439851a590918.html
评论列表(0条)