Export As: [ PDF | ODT ]

Exporter Settings

Summary

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

Example

Click the name of the example below to save it as a file.

Exporter_Settings.dsa
// 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( String( "Class Name : %1" ).arg( oExporter.className() ) );
	print( String( "Description : %1" ).arg( oExporter.getDescription() ) );
	print( String( "Extension : %1" ).arg( oExporter.getExtension() ) );
	print( oSettings.toString() );
	print( "\n" );
}