⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 background.bas

📁 surfer开发脚本
💻 BAS
字号:
'============================================================================
'BACKGROUND.BAS
'
'This script demonstrates the following:
'	Grid a sample data file
'	Create a contour map
'	Create checkered background color
'
'												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")
	
	'Make Surfer visible
	SurferApp.Visible = True
	
	'Set path
	Path=SurferApp.Path+"\Samples\"
	
	'Declares Doc As an Object
	Dim Doc As Object
	
	'Creates a new document with variable name "Doc"
	Set Doc = SurferApp.Documents.Add
	
	'Grid the data file
	SurferApp.GridData (DataFile:=path+"demogrid.dat", _
		ShowReport:=False, Algorithm:=srfKriging, OutGrid:=path+"sample.grd")
	
	'Declares MapFrame as an Object
	Dim MapFrame As Object
	
	'Creates a contour map & assigns the map frame to the variable "MapFrame"
	Set MapFrame = Doc.Shapes.AddContourMap(GridFileName:=Path+"sample.grd")
	
	'Changes the map background
	MapFrame.BackgroundFill.Pattern = "Diagonal Cross"
	MapFrame.BackgroundFill.BackColor = srfColorRed
	MapFrame.BackgroundFill.ForeColor = srfColorIceBlue	
	
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -