📄 expbit.bas
字号:
'==========================================================================
'EXPBIT.BAS
'
'This script demonstrates the following:
'
' Create a contour map
' Export to bitmap
'
' SKP 9/99 Surfer 7
'==========================================================================
Sub Main
'Declare the variable that will reference the application
Dim SurferApp As Object
'Creates an instance of the Surfer Application object
' and assigns it to the variable named "SurferApp"
Set SurferApp = CreateObject("Surfer.Application")
'Assigns the location of the data and grid files to the variable "Path"
Path = SurferApp.Path + "\samples\"
'Makes Surfer visible
SurferApp.Visible = True
'Declares Doc as Object
Dim Doc As Object
'Creates a plot document in Surfer and assigns it to the variable "Doc"
Set Doc = SurferApp.Documents.Add
'Declares MapFrame as object
Dim MapFrame As Object
'Creates a contour map and assigns the map frame to the variable "MapFrame"
Set MapFrame = Doc.Shapes.AddContourMap(GridFileName:=Path+"demogrid.grd")
'Declares ContourMap as an object
Dim ContourMap As Object
'Assigns the contour overlay to the variable "ContourMap" for easier access
Set ContourMap = MapFrame.Overlays(1)
'Export to Bitmap with 200 DPI resolution
Doc.Export(FileName:=Path+"demogrid.bmp", _
Options:="Defaults=1,HDPI=200,VDPI=200,ColorDepth=4")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -