论坛首页    职业区    学术与写作    工程技术区    软件区    资料区    商务合作区    社区办公室
 您好! 欢迎 登录注册 最新帖子 邀请注册 活动聚焦 统计排行 社区服务 帮助
 
  • 帖子
  • 日志
  • 用户
  • 版块
  • 群组
帖子
  • 25174阅读
  • 42回复

如何把CAD中的地形图转换成Surfer? [复制链接]

上一主题 下一主题
离线liufeihu0895

发帖
579
土币
6518
威望
5908
原创币
0
只看该作者 12楼 发表于: 2009-08-30
      
离线cjtlaotou

发帖
376
土币
56
威望
1312
原创币
0
只看该作者 13楼 发表于: 2009-12-18
需要编制一个二次开发程序
离线cjtlaotou

发帖
376
土币
56
威望
1312
原创币
0
只看该作者 14楼 发表于: 2009-12-18
如何把CAD中的地形图转换成Surfer
如何把CAD中的地形图转换成Surfer
离线cjtlaotou

发帖
376
土币
56
威望
1312
原创币
0
只看该作者 15楼 发表于: 2009-12-18
如何把CAD中的地形图转换成Surfer
离线cjtlaotou

发帖
376
土币
56
威望
1312
原创币
0
只看该作者 16楼 发表于: 2009-12-18
如何把CAD中的地形图转换成Surfer
离线cjtlaotou

发帖
376
土币
56
威望
1312
原创币
0
只看该作者 17楼 发表于: 2009-12-18
如何把CAD中的地形图转换成Surfer
离线yifengpan

发帖
210
土币
-172
威望
-224
原创币
0
只看该作者 18楼 发表于: 2009-12-18
Public Sub GetText_控制点() '提取AutoCAD中测量点坐标
    Const PLayer As String = "GCD" '定义测量点所在图层,"*"代表所有
    Const FileName As String = "d:\ds_pointsets_GCD.dat" '定义保存测量点路径
    Dim adText As AcadText
    Dim adSS As AcadSelectionSet
    Dim fType(0 To 1) As Integer, fData(0 To 1)
    'On Error Resume Next
    Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    If Err Then Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    adSS.Clear
    fType(0) = 0: fData(0) = "TEXT": fType(1) = 8: fData(1) = PLayer '过滤条件
    adSS.Select acSelectionSetAll, , , fType, fData
    Open FileName For Append As #1
    For Each adText In adSS
        Print #1, Format(adText.InsertionPoint(0) - 1, "0.00"), Format(adText.InsertionPoint(1) + 2, "0.00"), adText.TextString
    Next adText
    Close #1
    adSS.Delete '选择集删除
    MsgBox "提取成功!"
End Sub
Public Sub GetLWPOLYLINE_等高线() '提取AutoCAD中多段线段点坐标
    Const PLayer As String = "DGX" '定义测量点所在图层,"*"代表所有
    Const FileName As String = "d:\ds_pointsets_DGX.dat" '定义保存测量点路径
    Dim Lwpl As AcadLWPolyline
    Dim adSS As AcadSelectionSet
    Dim i As Integer
    Dim Pt As Variant
    Dim fType(0 To 1) As Integer, fData(0 To 1)
    Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    If Err Then Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    adSS.Clear
    fType(0) = 0: fData(0) = "LWPOLYLINE": fType(1) = 8: fData(1) = PLayer '过滤条件
    adSS.Select acSelectionSetAll, , , fType, fData
    Open FileName For Append As #1
    For Each Lwpl In adSS
        Pt = Lwpl.Coordinates
        Dim xdataOut As Variant
        Dim xtypeOut As Variant
        For i = 0 To UBound(Pt) Step 2
            Print #1, Format(Pt(i), "0.00"), Format(Pt(i + 1), "0.00"), Lwpl.Elevation
        Next i
    Next Lwpl
    Close #1
    adSS.Delete '选择集删除
    MsgBox "提取成功!"
End Sub
Public Sub GetPOLYLINE_等高线() '提取AutoCAD中多段线段点坐标
    Const PLayer As String = "DGX" '定义测量点所在图层,"*"代表所有
    Const FileName As String = "d:\ds_pointsets_DGX.dat" '定义保存测量点路径
    Dim Lwpl As AcadPolyline
    Dim adSS As AcadSelectionSet
    Dim i As Integer
    Dim Pt As Variant
    Dim fType(0 To 1) As Integer, fData(0 To 1)
    Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    If Err Then Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    adSS.Clear
    fType(0) = 0: fData(0) = "POLYLINE": fType(1) = 8: fData(1) = PLayer '过滤条件
    adSS.Select acSelectionSetAll, , , fType, fData
    Open FileName For Append As #1
    For Each Lwpl In adSS
        Pt = Lwpl.Coordinates
        Dim xdataOut As Variant
        Dim xtypeOut As Variant
        For i = 0 To UBound(Pt) Step 3
            Print #1, Format(Pt(i), "0.00"), Format(Pt(i + 1), "0.00"), Format(Pt(i + 2), "0.00")
        Next i
    Next Lwpl
    Close #1
    adSS.Delete '选择集删除
    MsgBox "提取成功!"
End Sub
Public Sub GetBLANK_白化() '提取AutoCAD中多段线段白化范围
    Const PLayer As String = "圈定" '定义测量点所在图层,"*"代表所有
    Const FileName As String = "d:\d.bln" '定义保存测量点路径
    Dim Lwpl As AcadLWPolyline
    Dim adSS As AcadSelectionSet
    Dim i As Integer
    Dim Pt As Variant
    Dim fType(0 To 1) As Integer, fData(0 To 1)
    Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    If Err Then Set adSS = ThisDrawing.SelectionSets.Add("adSS")
    adSS.Clear
    fType(0) = 0: fData(0) = "LWPOLYLINE": fType(1) = 8: fData(1) = PLayer '过滤条件
    adSS.Select acSelectionSetAll, , , fType, fData
    Open FileName For Append As #1
    For Each Lwpl In adSS
        Pt = Lwpl.Coordinates
        Dim xdataOut As Variant
        Dim xtypeOut As Variant
        Print #1, (UBound(Pt) + 1) / 2 & ",0"
        For i = 0 To UBound(Pt) Step 2
            Print #1, Format(Pt(i), "0.00") & "," & Format(Pt(i + 1), "0.00")
        Next i
        
    Next Lwpl
    Close #1
    adSS.Delete '选择集删除
    MsgBox "提取成功!"
End Sub
离线dzshuhua

发帖
491
土币
23174
威望
1164
原创币
0
只看该作者 19楼 发表于: 2009-12-20
好文件,好得很!
离线dzshuhua

发帖
491
土币
23174
威望
1164
原创币
0
只看该作者 20楼 发表于: 2009-12-20
学习,学习,向的到好久了
离线afa123
发帖
234
土币
190
威望
1742
原创币
0
只看该作者 21楼 发表于: 2010-01-21
好资料啊,谢谢楼主分享!
离线afa123
发帖
234
土币
190
威望
1742
原创币
0
只看该作者 22楼 发表于: 2010-01-21
好资料啊,谢楼主好资料啊,好资料啊,谢谢楼主分享!谢谢楼主分享!分享!
离线zzxzzx

发帖
775
土币
561
威望
3770
原创币
0
只看该作者 23楼 发表于: 2010-02-23
不知道!!!!!!
快速回复
限100 字节
温馨提示:欢迎交流讨论,请勿纯表情、纯引用!
 
上一个 下一个

      https://beian.mps.gov.cn/ 粤公网安备 44010602012919号 广州半山岩土网络科技有限公司 粤ICP备2024274469号

      工业和信息化部备案管理系统网站