IMcEngineEnumUserMeasurements Method |
![]() |
Namespace: MediaCy.IQL.Engine
Function EnumUserMeasurements ( <OutAttribute> ByRef CookieNext As Integer, <OutAttribute> ByRef RegisteredName As String, <OutAttribute> ByRef RegisteredMcUserMeasureObject As Object, <OutAttribute> ByRef RegisteredAllowedParent As mcMeasurementParentAllowed ) As Integer
'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