Click or drag to resize

IMcEngineEnumUserMeasurements Method

Enumerates registered user measurements.

Namespace:  MediaCy.IQL.Engine
Assembly:  MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
Syntax
VB
Function EnumUserMeasurements ( 
	<OutAttribute> ByRef CookieNext As Integer,
	<OutAttribute> ByRef RegisteredName As String,
	<OutAttribute> ByRef RegisteredMcUserMeasureObject As Object,
	<OutAttribute> ByRef RegisteredAllowedParent As mcMeasurementParentAllowed
) As Integer

Parameters

CookieNext
Type: SystemInt32
Initialize this to zero to start the enumeration or to get the number of user measurements registered. Make a call with this initialized to -1 to terminate the enumeration early.
RegisteredName
Type: SystemString
The next measurement name is placed in this variable.
RegisteredMcUserMeasureObject
Type: SystemObject
The next measurement McUserMeasure object instance is placed in this variable.
RegisteredAllowedParent
Type: MediaCy.IQL.EnginemcMeasurementParentAllowed
THe next measurement's allowed parents enum is placed in this variable.

Return Value

Type: Int32
The number of registered measurements if there are more registered measurements to enumerate or zero if the enumeration is complete. When CookieNext is zero, this value will always be the number of registered measurements.
Examples
VB
'Get a list of the names of McLines user measurements
Dim CookieNext As Long
Dim RegisteredName As String
Dim RegisteredMcUserMeasureObject As McUserMeasure
Dim RegisteredAllowedParent As mcMeasurementParentAllowed
Dim Nregistered As Long
CookieNext = 0 'init enumeration
Nregistered = ThisApplication.EnumUserMeasurements( CookieNext, RegisteredName, _
RegisteredMcUserMeasureObject, RegisteredAllowedParent)
if Nregistered = 0 Then
ThisApplication.Output.PrintMessage "There are no registered user measurements"
Exit Sub
End If 'none registered
ReDim NameList( Nregistered-1) As String 'overallocate
Dim NforLines As Long
NforLines = 0
CookieNext = 0 'init enumeration
loop while  ThisApplication.EnumUserMeasurements( CookieNext, RegisteredName, _
RegisteredMcUserMeasureObject, RegisteredAllowedParent) <> 0
If RegisteredAllowedParent = mcmpaAnyParent Or _
RegisteredAllowedParent = mcmpaChildOfLines Or _
RegisteredAllowedParent = mcmpaDescendentOfFeatures  Then
NameList(NforLines) = RegisteredName
NforLines = NforLines + 1
End If
end loop
'allocate the real length
ReDim Keep NameList( NforLines-1) As String
ThisApplication.Output.PrintMessage "There are " + Str(NforLines) + _
" user-defined measurements for McLines.  The names are:"
ThisApplication.Output.PrintMessage GlobalTools.McToText( NameList).Value
See Also