Group access

''' -
''' Group access
''' -

Function groupsFromObjects(obj)
groupsFromObjects = Null
Dim i,j,r,s, count, grp, box, grpObj()
count = uBound(obj)
ReDim grp(count), group(0)
s=0
For i = 0 To count Step 1
grp(i) = Rhino.ObjectTopGroup(obj(i))
If i > 0 Then
r=0
j=0
Do Until j = s
If grp(i) <> group(j) Then
r=r+1
End If
j=j+1
Loop
If r = s Then
ReDim Preserve group(s)
group(s) = grp(i)
s=s+1
End If
Else
group(s) = grp(i)
s=1
End If
Next
ReDim grpObj(uBound(group))
For i = 0 To uBound(group) Step 1
grpObj(i) = Rhino.ObjectsByGroup (group(i))
Next
groupsFromObjects = grpObj
End Function

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License