- 积分
- 3288
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-7-7
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Private Sub Command8_Click()
Dim objSurfer As Object
Dim objPlot As Object
Dim objMapFrame As Object
Dim temp As Boolean
Dim ContourMap As Surfer.IContourMap
With dlgCommon1
.DialogTitle = "打开数据文件"
.Flags = 0
.CancelError = False
.FileName = ""
.Filter = "数据文件 (*.dat)|温度.dat"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
strinfile = .FileName
End With
strGridFile = Left(strinfile, Val(InStrRev(strinfile, ".")) - 1) + ".grd"
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = False
SurferApp.GridData DataFile:=App.Path & "\温度.dat", xCol:=1, yCol:=2, zCol:=3, Algorithm:=2, DupMethod:=2, ShowReport:=False, OutGrid:=App.Path & "\差值后1.grd", xMin:=105.589, xMax:=106.125, yMin:=28.95, yMax:=29.56
SurferApp.GridBlank InGrid:=App.Path & "\差值后1.grd", BlankFile:=App.Path & "\永川边界.bln", OutGrid:=App.Path & "\差值后1.grd"
Set Plot = SurferApp.Documents.Add(1)
Set ContourMapFrame = Plot.Shapes.AddContourMap(App.Path & "\差值后1.grd ")
Set ContourMap = ContourMapFrame.Overlays(1)
ContourMap.Levels.LoadFile (App.Path & "\温度(传真).lvl")
ContourMap.SmoothContours = 4
ContourMap.ShowColorScale = True
ContourMap.FillContours = True
ContourMap.ShowColorScale = True
ContourMap.ColorScale.FrameLine.Width = 0#
ContourMap.ColorScale.Left = ContourMap.Width + ContourMap.Left - 0.9
ContourMap.ColorScale.Width = 0.6
ContourMap.ColorScale.Height = 2.1
ContourMap.ColorScale.Top = ContourMap.Top - (ContourMap.Height - ContourMap.ColorScale.Height) / 1.1
ContourMap.ColorScale.LabelFont.Size = 8
ContourMap.LabelFont.Size = 5
Set BaseMap = Plot.Shapes.AddBaseMap(ImportFileName:=App.Path & "\永川边界.bln")
Set postmapframe = Plot.Shapes.AddPostMap(dataFileName:=App.Path & "\站点信息.txt", xCol:=1, yCol:=2, LabCol:=3)
Set postmap1 = postmapframe.Overlays(1)
Set MkFormat = postmap1.Symbol
With MkFormat
.Size = 0.05
.Index = 12
End With
Set lbFont = postmap1.LabelFont
With lbFont
.Face = "宋体"
.Size = 8
End With
Plot.Shapes.SelectAll
Plot.Selection.OverlayMaps
Plot.Export FileName:=App.Path & "\温度图(传真).gif", Options:="Width=700,Height=700"
Plot.Close
SurferApp.Quit
Picture1.Picture = LoadPicture(App.Path & "\温度图(传真).gif")
End Sub
|
-
|