CB.GetLockFitParm Example

The following macro statements define two variables named LockVal and useLock, lock the Location parameter of the Weibull distribution and set it to the value of -250, unlock the same parameter for the gamma distribution while setting the value of that parameter to -200, test whether the Weibull and gamma distributions have parameter locking switched on, and finally return the current values set for the Location parameters of the Weibull and gamma distributions.

Dim LockVal as Double
Dim UseLock as boolean
'Set the Weibull Location parameter to -250 for locking purposes and lock 
'it
cb.LockFitParm cbDfaWeibull, True, 1, -250
'Set the gamma Location parameter to -200 for locking purposes but do not 'lock it
cb.LockFitParm cbDfaGamma, False, 1, -200
'Test if the Weibull distribution has parameter locking switched on; 
'returns True
UseLock = CB.GetLockFitParm(cbDfaWeibull)
'Test if the gamma distribution has parameter locking switched on; 
'returns False
UseLock = CB.GetLockFitParm(cbDfaGamma)
'Find the value set for the Weibull Location parameter; returns -250
LockVal=CB.GetLockFitParm(cbDfaWeibull, 1)
'Find the value set for the gamma Location parameter; returns -200
LockVal=CB.GetLockFitParm(cbDfaGamma, 1)