User Tools

Site Tools

Exporter Settings


Below is an example demonstrating how you can iterate over all exporters and inspect them for any script accessible settings. These settings can then be used to control the exporter via script.

API Areas of Interest


// Define an anonymous function;
// serves as our main loop,
// limits the scope of variables
	// Get the export manager
	var oExportMgr = App.getExportMgr();
	// Get the number of exporters
	var nExporters = oExportMgr.getNumExporters();
	// Declare variables we'll be using as we iterate
	var oExporter, oSettings;
	// Iterate over all exporters
	for( var i = 0; i < nExporters; i += 1 ){
		// Get the 'current' exporter
		oExporter = oExportMgr.getExporter( i );
		// Create a new settings object to collect settings with
		oSettings = new DzFileIOSettings();
		// Cause the exporter to give up the goods,
		// without displaying its options dialog
		oExporter.getOptions( oSettings, false, "" );
		// Dump information about the exporter to the console/log,
		// so we can see what we're dealing with
		print( "-----------------------------" );
		print( "Class Name :", oExporter.className() );
		print( "Description :", oExporter.getDescription() );
		print( "Extension :", oExporter.getExtension() );
		print( "Settings :", oSettings.toJsonString() );
		print( "\n" );
// Finalize the function and invoke