CStats:GetStatus
The GetStatus method returns a status for the last statistics calculation. A value of 0 indicates success and other values correspond to an error condition.
sMsg = CStats:GetErrMsg() |
Returns 0 if the last statistics calculation succeeded.
Otherwise, returns an error code.
The CStats calculations return a value and not an error message. If you wish to check the result of a calculation, call this method to get the status code. if the status code is not 0, you can fetch the error message using GetErrMsg. Note:This method also returns 0 if there is no CStats object.
The following script checks the MinMaxClipMean calculation for success and prints an error message if it failed:
|
-- create a CStats object |
|
-- specify CImage and CRect to measure |
|
-- returns the mean value |
|
-- if calculation failed, this returns nonzero |
|
-- show the error message |
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.