shp文件转换到CAD dwg,dxf

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信