app.project.reduceProject(array_of_items)
Description
Removes all items from the project except those specified. Same as the File > Reduce Project command.
Parameters
array _ o f _ i te m s An array containing the Item objects that are to be kept.
Returns
Integer; the total number of items removed.
Example
var theItems = new Array();
theItems[theItems.length] = app.project.item(1);
theItems[theItems.length] = app.project.item(3);
app.project.reduceProject(theItems);