📄 variogramobject.bas
字号:
Debug.Print "PairsFont";vario1.PairsFont.Face
shapes1("Text").Text = "PairsFont:"+ vario1.PairsFont.Face
Wait 1
vario1.PairsFont.Face = "Times New Roman"
Debug.Print "PairsFont";vario1.PairsFont.Face
shapes1("Text").Text = "PairsFont:"+ vario1.PairsFont.Face
'-----------------------------------------------------------------
'The ShowExperimental Property returns or sets the display of the
' line in the experimental variogram. It returns a Boolean.
'-----------------------------------------------------------------
Debug.Print "ShowExperimental? ";vario1.ShowExperimental
shapes1("Text").Text = "ShowExperimental? "+ vario1.ShowExperimental
Wait 1
vario1.ShowExperimental = False 'Turn off line.
Debug.Print "ShowExperimental? ";vario1.ShowExperimental
shapes1("Text").Text = "ShowExperimental? "+ vario1.ShowExperimental
Wait 1
vario1.ShowExperimental = True 'Turn line on.
'---------------------------------------------------------------
'The ShowModel Property returns or sets the display of the model
' line in the variogram. It returns a Boolean.
'---------------------------------------------------------------
Debug.Print "ShowModel? ";vario1.ShowModel
shapes1("Text").Text = "ShowModel? "+ vario1.ShowModel
Wait 1
vario1.ShowModel = False 'Turn off line.
Debug.Print "ShowModel? ";vario1.ShowModel
shapes1("Text").Text = "ShowModel? "+ vario1.ShowModel
Wait 1
vario1.ShowModel = True 'Turn line on.
'--------------------------------------------------------------
'The TitleFont returns the font properties of the variogram
' subtitle, which displays the angle and tolerance. It
' returns a FontFormat Object.
'--------------------------------------------------------------
Debug.Print "TitleFont Face: ";vario1.TitleFont.Face
shapes1("Text").Text = "TitleFont Face: "+vario1.TitleFont.Face
Wait 1
vario1.TitleFont.Size = 25
Debug.Print "TitleFont Size: ";vario1.TitleFont.Size
shapes1("Text").Text = "TitleFont Size: "+vario1.TitleFont.Size
Wait 1
'--------------------------------------------------------------
'The SubTitleFont returns the font properties of the variogram
' subtitle, which displays the angle and tolerance. It
' returns a FontFormat Object.
'--------------------------------------------------------------
Debug.Print "SubTitleFont Face: ";vario1.SubTitleFont.Face
shapes1("Text").Text = "SubTitleFont Face: "+vario1.SubTitleFont.Face
Wait 1
vario1.SubTitleFont.Size = 25
Debug.Print "SubTitleFont Size: ";vario1.SubTitleFont.Size
shapes1("Text").Text = "SubTitleFont Size: "+vario1.SubTitleFont.Size
Wait 1
'----------------------------------------------------------------
'The ShowSubTitle Property returns or sets the display of the
' variogram subtitle, which displays the direction and tolerance.
' It returns a Boolean.
'----------------------------------------------------------------
Debug.Print "ShowSubtitle? ";vario1.ShowSubTitle
shapes1("Text").Text = "ShowSubtitle? "+ vario1.ShowSubTitle
Wait 1
vario1.ShowSubTitle = False 'Turn off subtitle.
Debug.Print "ShowSubtitle? ";vario1.ShowSubTitle
shapes1("Text").Text = "ShowSubtitle? "+ vario1.ShowSubTitle
Wait 1
vario1.ShowSubTitle = True 'Turn subtitle on.
'--------------------------------------------------------------
'The ShowSymbols Property returns or sets the display of the
' symbols in the experimental variogram. It returns a Boolean.
' If ShowPairs is True, they remain visible even when
' ShowSymbols is False.
'--------------------------------------------------------------
Debug.Print "ShowSymbols? ";vario1.ShowSymbols
shapes1("Text").Text = "ShowSymbols? "+vario1.ShowSymbols
Wait 1
vario1.ShowSymbols = False 'Turn symbols off
Debug.Print "ShowSymbols? ";vario1.ShowSymbols
shapes1("Text").Text = "ShowSymbols? "+vario1.ShowSymbols
Wait 1
vario1.ShowSymbols = True 'Turn symbols on.
'-------------------------------------------------------------
'The Symbol Property returns a MarkerFormat Object containing
' the properties of the symbols on the experiemental
' variogram.
'-------------------------------------------------------------
Debug.Print "Symbol Index: ";vario1.Symbol.Index
shapes1("Text").Text = "Symbol Index: "+vario1.Symbol.Index
Wait 1
vario1.Symbol.Index = 0
Debug.Print "Symbol Index: ";vario1.Symbol.Index
shapes1("Text").Text = "Symbol Index: "+vario1.Symbol.Index
Wait 1
'-------------------------------------------------------------
'The ShowVariance Property returns or sets the display of the
' variance line, a dashed horizontal line by default. It
' returns a Boolean.
'-------------------------------------------------------------
Debug.Print "ShowVariance? ";vario1.ShowVariance
shapes1("Text").Text = "ShowSymbols? "+vario1.ShowVariance
Wait 1
vario1.ShowVariance = True 'Turn variance line on.
Debug.Print "ShowVariance? ";vario1.ShowVariance
shapes1("Text").Text = "ShowVariance? "+vario1.ShowVariance
Wait 1
'-----------------------------------------------------------
'The VarianceLine Property returns a LineFormat Object with
' the properties of the variance line.
'-----------------------------------------------------------
Debug.Print "VarianceLine Style: ";vario1.VarianceLine.Style
shapes1("Text").Text = "VarianceLine Style: " + _
vario1.VarianceLine.Style
Wait 1
vario1.VarianceLine.Style = "Solid"
Debug.Print "VarianceLine Style: ";vario1.VarianceLine.Style
shapes1("Text").Text = "VarianceLine Style: " + _
vario1.VarianceLine.Style
Wait 1
'--------------------------------------------------------------
'The VerticalScale Property returns or sets the vertical scale
' of the variogram. It returns a double. Experimental tab of
' Variogram Properties dialog box.
'--------------------------------------------------------------
Debug.Print "VerticalScale:"; vario1.VerticalScale
shapes1("Text").Text = "VerticalScale:"+Str(vario1.VerticalScale)
Wait 1
vario1.VerticalScale = vario1.VerticalScale*2
Debug.Print "VerticalScale:"; vario1.VerticalScale
shapes1("Text").Text = "VerticalScale:"+Str(vario1.VerticalScale)
Wait 1
vario1.VerticalScale = vario1.VerticalScale/2
'========================
'VariogramObject Methods
'========================
'The AutoFit Method fits the variogram parameters
' to the current model.
'------------------------------------------------
Debug.Print "AutoFit"
shapes1("Text").Text = "AutoFit"
variocomponents = vario1.Model
'List current model components.
For i = LBound(variocomponents) To UBound(variocomponents)
Debug.Print " Component";i;" Type:"; variocomponents(i).Type; " "; _
variocomponentname(variocomponents(i).Type) 'See functions below.
Debug.Print " Scale or Nugget Error Variance:"; _
variocomponents(i).Param1
Debug.Print " Slope, Length, or Nugget Micro Variance:"; _
variocomponents(i).Param2
Debug.Print " Anisotropy Ratio & Angle:"; _
variocomponents(i).AnisotropyRatio; _
variocomponents(i).AnisotropyAngle
Next i
Wait 1
vario1.AutoFit
variocomponents = vario1.Model
Debug.Print "AutoFit values"
For i = LBound(variocomponents) To UBound(variocomponents)
Debug.Print " Component";i;" Type:"; variocomponents(i).Type; " "; _
variocomponentname(variocomponents(i).Type) 'See functions below.
Debug.Print " Scale or Nugget Error Variance:"; _
variocomponents(i).Param1
Debug.Print " Slope, Length, or Nugget Micro Variance:"; _
variocomponents(i).Param2
Debug.Print " Anisotropy Ratio & Angle:"; _
variocomponents(i).AnisotropyRatio; _
variocomponents(i).AnisotropyAngle
Next i
'-----------------------------------------------------------------
'The Export Method exports the experimental variogram data points
' to an ASCII DAT file.
' The X coordinates (spearation distance) are in column A,
' the Y coordinates (variogram g(h) are in column B,
' the number of pairs are in column C.
' This method returns a Boolean.
'-----------------------------------------------------------------
Debug.Print "Export to vario.dat"
shapes1("Text").Text = "Export to vario.dat"
vario1.Export(path1+"vario.dat")
End Sub
Function varioestimatorname(x)
ven = Array("0", _
"srfVarioVariogram", _
"srfVarioStdVariogram", _
"srfVarioAutocovariance", _
"srfVarioAutocorrelation")
varioestimatorname = ven(x)
End Function
Function variocomponentname(x)
vcn = Array("0", _
"srfVarExponential", _
"srfVarGaussian", _
"srfVarLinear", _
"srfVarLogarithmic", _
"srfVarNugget", _
"srfVarPower", _
"srfVarQuadratic", _
"srfVarRationalQuadratic", _
"srfVarSpherical", _
"srfVarWave")
variocomponentname = vcn(x)
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -