- 积分
- 8
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-6-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
部分代码如下所示,当运行到标红一行就显示了如题所示的错误提示'expecting a parameter name',不晓得问题出在哪里,新手套用模板编程,
之前都没问题,修改了路径,文件名,就出错了,急求大神指导!
Sub Main
'Declare the variable that will reference the application
Dim SurferApp As Surfer.Application
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True
'path
dirPath = "E:\IWP\DATA\Drought Predicting\Correlation Analysis\Predictors 2014\Element field ana\"
OutGrid = "E:\IWP\DATA\Drought Predicting\Correlation Analysis\Predictors 2014\Element field ana\surfer\For sst\"
Dim ID As String
Dim Infile As String
ID = "0.05coe-spi_sst_SUM-h-y" '修改
IDout ="0.05coe-spi_sst_SUM-h-y-SUM1" '修改
Infile = dirPath+ID+".txt" '+ CStr(k)
'creat grid file with text file
SurferApp.GridData(DataFile:=Infile,_
xCol:=1, yCol:=2,zCol:=3,_'修改
NumCols:= 1000, NumRows:= 460, Algorithm:=srfKriging, _
ShowReport:=False, SearchEnable:=True, _
xMin:=0,xMax:=358,yMin:=-76,yMax:=88, _
OutGrid:= OutGrid + IDout +".grd", OutFmt:=srfGridFmtS7)
|
|