有的时候,仅仅只有Srf工程文件,没有网格文件。
比如网格文件丢失,比如对方仅仅给了Srf工程文件,在需要对数据进行琢磨时可以利用如下办法得到网格文件
打开Surfer等值线,选中,运行如下Surfer脚本语言
Sub Main
Dim Surf As Object
Dim plotdoc1 As Object
Dim shapes1 As Object
Dim mapframe1 As Object
Dim ovrly As Object
Dim grd As String
Debug.Print “—– “;Time;” —–”
Set Surf = GetObject(,”surfer.application”)
Set plotdoc1 = Surf.ActiveDocument
Set shapes1 = plotdoc1.Shapes
Set mapframe1 = plotdoc1.Selection(1)
For Each ovrly In mapframe1.Overlays
‘Vector map Not included. srfShapeVectorMap = 23.
Debug.Print ovrly.Type;InStr(” 15 16 19 20 22″, ovrly.Type)
If InStr(” 15 16 19 20 22″,ovrly.Type) <> 0 Then _
ovrly.Grid.SaveFile(GetFilePath(ovrly.Grid.FileName,”grd”, _
“c:\incoming\”,”Save GRD File”,3),Surfer.srfGridFmtS7)
Next ovrly
End
End Sub
即可
不能正常运行啊 到Debug.Print “—– “;Time;” —–”
[回复]
shunfly 回复:
05月 10th, 2010 at 19:13
你的Surfer版本是?这个我试验很多次了,也有朋友试验成功了
[回复]