- 积分
- 89
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.GridData DataFile:=File1.Path + "\" + File1.FileName, ShowReport:=False, DupMethod:=2, OutGrid:=App.Path + "\drawcontour.grd"
SurferApp.GridBlank InGrid:=App.Path + "\drawcontour.grd", BlankFile:=App.Path() + "\map\gymap.bln", OutGrid:=App.Path() + "\Out.grd"
PicName = App.Path() + "\pic\" + Mid(File1.FileName, 1, Len(File1.FileName) - 4) + ".jpg"
Set plot = SurferApp.Documents.Add(1)
Set contourmapframe = plot.Shapes.AddContourMap(App.Path() + "\Out.grd")
Set contourmap = contourmapframe.Overlays(1)
Select Case Combo1.ListIndex
Case 0
contourmap.Levels.LoadFile (App.Path + "\color1.lvl")
Case 1
contourmap.Levels.LoadFile (App.Path + "\color2.lvl")
Case 2
contourmap.Levels.LoadFile (App.Path + "\color3.lvl")
End Select
contourmap.SmoothContours = 4
contourmap.ShowColorScale = True
contourmap.FillContours = True
Set BaseMap = plot.Shapes.AddBaseMap(ImportFileName:=App.Path + "\map\gymap.bln")
Set BaseMap1 = plot.Shapes.AddBaseMap(ImportFileName:=App.Path + "\map\gyxian.bln")
Set PostMapFrame = plot.Shapes.AddPostMap(DataFileName:=App.Path + "\station.txt", LabCol:=3)
Set PostMap1 = PostMapFrame.Overlays(1)
Set mkformat = PostMap1.Symbol
PostMap1.LabelPos = 5
With mkformat
.Size = 0.03
.Index = 45
End With
Set LbFont = PostMap1.LabelFont
With LbFont
.Face = "宋体"
.Size = 6
End With
Set AddText = plot.Shapes.AddText(x:=3, y:=3.2, Text:=Text1.Text)
With AddText.Font
.Face = "宋体"
.Size = 12
End With
plot.Shapes.SelectAll
plot.Selection.OverlayMaps
plot.Export FileName:=PicName, Options:="Width=" & Text2.Text & ",Height=" & Text3.Text
plot.Close
SurferApp.Quit
Image1.Picture = LoadPicture(PicName)
|
评分
-
查看全部评分
|