Community
Hi everyone
I set some member groups in RSA manually.
And then, I want to get one of these groups through the following API, but it needs the index of the group. How should get the index?
Solved! Go to Solution.
Solved by Stephane.kapetanovic. Go to Solution.
hi @shulwh
Sub ListGroupBars()
Dim RobApp As IRobotApplication, RGroups As RobotGroupServer
Set RobApp = New RobotApplication
Set RGroups = RobApp.Project.Structure.Groups
Dim Group As RobotGroup, GroupCnt As Integer, ObjTyp As IRobotObjectType
ObjTyp = IRobotObjectType.I_OT_BAR
GroupCnt = RGroups.GetCount(ObjTyp)
If GroupCnt <> 0 Then
For j = 1 To GroupCnt
Set Group = RGroups.Get(ObjTyp, j)
Debug.Print j, Group.Name, Group.SelList, Group.Color
Next j
End If
Set RobApp = Nothing
End Sub
Best Regards
Can't find what you're looking for? Ask the community or share your knowledge.