Navigation: Scripting Reference Manual > Functions & Subroutines > GetFromNthGroup

 

GetFromNthGroup

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves the identifier of a particular item from a specified group.

 

Syntax

n = GetFromNthGroup ( group, indx )

 

Parameters

n (Long)

Node number of the item from the group.

 

group As Long

Node number of the group.

 

indx As Long

The group index (zero based) of the item to be retrieved.

 

Remarks

This function retrieves the identifier of a particular item from a specified group. If there is a problem the function sets an error and returns -1.

 

See Also

GetGroupCount

GetNthGroupCount

FindGroup

AddGroup

AddToNthGroup

DeleteFromNthGroup

Examples

The following example finds the number of groups in a FRED document and prints the members of each group to the Output Window:

Dim id1&
Print "There are " & GetGroupCount() & " groups in this document"

For i=0 To GetGroupCount()-1
 Print "Group name - " & GetGroupName(i)
 Print "There are " & GetNthGroupCount (i) & " entities in this group"
 Print "The node numbers and names of entities in this group are "
  For j=0 To GetNthGroupCount(i)-1
   Print GetFromNthGroup(i,j) & " name - " & GetFullName(GetFromNthGroup(i,j))
  Next j
Next i
 

 

 

 

 

 

Copyright © Photon Engineering, LLC