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

Vicon Shogun banner

You can use the print command to write the contents of specified strings to the Log.

The following code fragments review techniques for displaying information collected by a script. Review the comments to learn what each set of codes do. Cut, paste and modify the fragments to create your own scripts. To test most of these fragments you will have to have previously loaded a scene with markers.

// The following statement creates an array, or list,
// of all the MarkerNodes in the scene
string $modArray[];
$modArray = `getModules -type "Marker"`;

//This calculates and prints the translation value for
// RFHD at the current time
vector $pos = RFHD.getVectorProperty( "Translation" );
print $pos;

//This returns and prints the elements of a
// string array
string $a;
$a = getStringProperty( $modArray[0], Name );
print $a;

// This prints a module element's name just by
// casting the module to a string
print( string( $modArray[0] ) );

//You can print the value of any object's translation
//  property using the following statement. Modify this
//  statement to print the value of any property.
print( string( `getVectorProperty $modArray[0] "Translation"` ) );