Enumerate_All_Groups 方法示例

下列代码提供了 Enumerate_All_Groups 方法的一个示例:

Public Function GetAllGroupList(objPic As CFixPicture, ByRef colDIList As Collection) As Boolean

    Dim colPIC As CFixObjectCollection

    Dim colList As CFixObjectCollection

    Dim objDI As Object

    

    If TypeName(objPic) = "Nothing" Or objPic.Category <> "Pictures" Then

        GetAllGroupList = False

        GoTo CLEAN_UP

    End If

    

    'If objHelper.ClassName <> "GeometryHelper" Then

    '    GetMasterDynamoList = False

    '    GoTo CLEAN_UP

    'End If

    

    '清空图符实例列表

    Do While colDIList.Count > 0

        colDIList.Remove (1)

    Loop

    

    '获取指定 DynamoSets 上的所有主图符

    Set colPIC = objPic.ContainedObjects

    Call PlugandSolve.GeometryHelperObj.Enumerate_All_Groups(colPIC, colList)

    If colList.Count <= 0 Then

        GetAllGroupList = True

        GoTo CLEAN_UP

    End If

    

    For Each objDI In colList

        colDIList.Add objDI

    Next objDI

    

    GetAllGroupList = True

CLEAN_UP:

    On Error Resume Next

    Set colList = Nothing

    Set colPIC = Nothing

    Set objDI = Nothing

    

End Function

 

您最近了解过 iFIX 吗 ?

查看最新版 iFIX 的所有新功能。

让 iFIX 帮助您提高效率,降低成本。