Wednesday, April 16, 2014

Autodesk Vault Programmer's Cookbook. 3.1. Getting groups



To get groups you have to call one of the Get* -like methods.
Operation Object Method

Group ById GetGroupById
ByName GetGroupByName
Groups ByIds GetGroupsByIds
ByNames GetGroupsByNames
GroupInfo ByGroupId GetGroupInfoByGroupId
GroupInfos ByGroupIds GetGroupInfosByGroupIds
ChildGroupIds ByGroupId GetChildGroupIdsByGroupId
MemberGroups ByGroupId GetMemberGroupsByGroupId
ParentGroupIds ByGroupId GetParentGroupIdsByGroupId

The most easy method is GetAllGroups(), that returns all groups. After that you can return all objects, or filter required. In PowerShell filtering is made with Where-Object cmdlet.

Knowing IDs, or group names, we can retreive specific group.

However, the Group class does not store complete information on the group. There is expanding its class GroupInfo. Geting the instances of this class may also be done by using the method invocation.

Since the groups are in certain respects with each other, it makes sense to have access to these relations.