This information is for Vicon Shogun 1.7. For up-to-date help, see the latest Shogun documentation.

Vicon Shogun banner


Returns an array of all modules currently in the scene

The getModules command is useful in script procedures for automatically identifying the modules in the scene. The flags provide options for narrowing results based upon selection status, or module type.

The results of the command are saved to a module array which may in turn be passed to a subsequent command or procedure.

Functional area

Data retrieval

Command syntax


getModules [-type string] [-primary] [-selected] [-fullPath] [-nameOnly]




NameFlag argumentsArgument typeExclusive toComments
type1stringReturn only modules of the named type.
primary0selectedReturn only the current primary selection.
selected0primaryReturn only modules that are currently selected.

Return value

string array


string $mds[] = `getModules -type BoneNode`;
int $i;
for( $i = 0;
$i < $mds.getCount();
$i += 1 )
print( $mds[$i] );
print ($mds.getCount());

// In this small procedure, a module array called "$mds" is declared
// and all scene modules of the type BoneNode are assigned to it.
// The for loop iterates through the elements of the array and
// prints each one to the interface. The last line prints the value
// of $mds.getCount, an integer describing the number of modules
// that were found in this instance.

Additional information

Related commands