The Motive Batch Processor is a Windows application that applies a function, in the form of an IronPython or C# script file, to a set of selected Take files. The Batch Processor includes some example script files but, in general, you must write your own. Scripts make use of the NMotive .NET class library. Note that you can also use the NMotive classes to write .NET programs and IronPython scripts that run outside of the Batch Processor. The NMotive assembly installed in the Global Assembly Cache and also located in the assemblies sub-directory of the Motive install directory. For example, the default location for the assembly included in the 64-bit Motive installer is:
A class reference in Microsoft compiled HTML format can be found in the Help sum-directory of the the Motive install directory. For example the default location for the help file is (64-bit Motive installer):
Motive Batch Processor can run C# and IronPython scripts. Here we describe the C# script format and give an example.
A valid Batch Processor C# script file must contain a single class implementing the ItakeProcessingScript interface. This interface defines a single function -
Result ProcessTake( Take t, ProgressIndicator progress ).
Result ProcessTake( Take t, ProgressIndicator progress )
Result, Take, and ProgressIndicator are all classes defined in the NMotive namespace. The Take object t is an instance of the NMotive Take class. It is the take being processed. The progress object is an instance of the NMotive ProgressIndicator and allows the script to update the Batch Processor UI with progress and messages. The general format of an Batch Processor C# script is:
Result, Take, and ProgressIndicator
// any other using statements
public class MyCSharpScript : ITakeProcessingScript
public Result ProcessTake(Take t, ProgressIndicator progress)
// Script processing code here
progress.SetMessage(“Done processing take “ + t.Name);
progress.SetProgress( 100 );