Click or drag to resize

IMcMeasuresSelect Method

Sets the Enabled state for selected measurements in the collection

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Sub Select ( 
	<OptionalAttribute> MeasureIDs As Object,
	Optional bEnable As Boolean = true
)

Parameters

MeasureIDs (Optional)
Type: SystemObject
If given, a scalar or array of either the name(s) of the measurements to be enabled (as a String) or the IDs of the measurements to be enabled. The name is McMeasure.Attributes(mcmaidName) and the ID is McMeasure.Attributes(mcmaidID). Note that the referenced measurement does not have to be part of the collection; it will be automatically added if necessary. If not given, then all measurements already in the collection are either enabled or disabled, based on the bEnable argument. This is equivalent to calling "SelectAll mcmcfAllCategories, bEnable".
bEnable (Optional)
Type: SystemBoolean
If True (the default), the selected measurements are Enabled. If False, the selected measurements are disabled.
Remarks
Only those McMeasure instances in the collection that have a True Enabled property will be computed when the Compute method is called and only those will be used for filtering features when the Filter method is called. Furthermore, event notifications are only fired for enabled measurements. Note, however that the Value property of an McMeasure will be correct when accessed no matter the state of its Enable property.
Examples
VB
'Set Enabled=True for mRgnArea and mRgnRoundness
ThisApplication.ActiveImage.RegionFeatures.Measures.Select Array( mRgnArea"", "mRgnRoundness"), True
'Or the same thing using ID
With ThisApplication.ActiveImage.RegionFeatures
.Measures.Select Array( .mRgnArea.Attributes(mcmaidID), .mRgnRoundness.Attributes(mcmaidID)), True
'Or the same thing with direct assignments to McMeasure.Enabled
.mRgnArea.Enabled = True
.mRgnRoundness.Enabled = True
End With 'ActiveImage.RegionFeatures
See Also