IMcEngineMeasurementSequence Property
|
|
The current measurement sequence number
Namespace:
MediaCy.IQL.Engine
Assembly:
MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
SyntaxReadOnly Property MeasurementSequence (
Optional IncrementSequence As Boolean = false
) As Integer
Get
Parameters
- IncrementSequence (Optional)
- Type: SystemBoolean
If given and TRUE, the sequence number is incremented by
one, after returning the current value. The default is to not increment the
value.
Return Value
Type:
Int32The current measurement sequence number. All measurements
already made will have a McMeasure.ValueSequence property of less than or
equal to this number, while all measurements made in the future will have a
ValueSequence property greater than this number.
RemarksThe MeasurementSequence property exposes a globally maintained sequence
number that can be used to determine if you have the most recently computed
Value of a measurement.
Note |
---|
No notifications are sent when this property changes.
As illustrated in the example, you can often capture the ValueSequence number of
a single measurement that you are interested in rather than capturing the
Engine.MeasurementSequence property. However, if you are making a whole group
of measurements, it is generally easier and faster to just capture the
MeasurementSequence property after accessing the Value property of all
measurements of interest. This sequence will always be greater than the
ValueSequence of any of your measurements, so it is always a valid test value to
see if some measurement is later recomputed. |
Examples
Public Sub MeasurementAndValueSequenceExample()
Dim myRegions As MediaCy.IQL.Features.McRegions = ThisApplication.ActiveImage.RegionFeatures
myRegions.SetEllipse(-1,100,100,90,70,45)
Dim dArea As Double = myRegions.mRgnArea.Value(0)
Dim nOurMeasSequence As Integer = ThisApplication.MeasurementSequence
If myRegions.mRgnArea.ValueSequence(nOurMeasSequence)<>0 Then
MsgBox( "Area measurement is still valid at " + CStr(dArea),,"MeasurementAndValueSequenceExample")
Else
dArea = myRegions.mRgnArea.Value(0)
nOurMeasSequence = ThisApplication.MeasurementSequence
nOurMeasSequence = myRegions.mRgnArea.ValueSequence
MsgBox( "Area measurement was refreshed to " + CStr(dArea),,"MeasurementAndValueSequenceExample")
End If
myRegions.Reset
End Sub
See Also