Gets all of the groups to which this user belongs.
Syntax
Visual Basic (Declaration) | |
---|
Sub GetGroupMemberships( _
ByRef poGroups As System.Object() _
) |
C# | |
---|
void GetGroupMemberships(
out System.object[] poGroups
) |
C++/CLI | |
---|
void GetGroupMemberships(
& [Out] System.array<Object^> poGroups
) |
Parameters
- poGroups
- Array of IEdmUserGroup6 interfaces
Example
The following sample code displays a message box with the names of all the groups to which a user, John, belongs:
Private Sub GetJohnsGroups(ByVal vault As IEdmVault12)
'Get the user interface of user 'John'
Dim userMgr As IEdmUserMgr7
userMgr = vault.CreateUtility(EdmUtility.EdmUtil_UserMgr)
Dim john As IEdmUser8
john = userMgr.GetUser("John")
'Get the groups to which he belongs
Dim groups() As Object
groups = Nothing
john.GetGroupMemberships(groups)
'Display a message box with the group names
Dim message As String
message = "John's groups:" + vbLf
Dim i As Integer
i = LBound(groups)
While (i <= UBound(groups))
Dim group As IEdmUserGroup7
group = groups(i)
message = message + group.Name + vbLf
i = i + 1
End While
MsgBox(message)
End Sub
Remarks
See Also
Availability
SolidWorks Enterprise PDM 2011