Using JSL you can both create and apply presets. When applying a preset, you can reference an anonymous preset created via JSL, the preset by name according to the presets menu, or by searching a folder for a match.
The following code replicates Example: Apply a Platform Preset. It applies the sample preset Check Normality to a Distribution from Tablet Production.jmp.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Tablet Production.jmp" );
obj = dt << Distribution( Continuous Distribution( Column( :Disso ) ) );
Wait( 2 );
obj[1] << Apply Preset( "Sample Presets", "Check Normality" );
Note that Apply Preset() on Distribution is slightly different than most of the platforms, requiring application to the sub-object.
The following code creates a preset using one report and applies it to a second report.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) );
preset = obj << New Preset();
dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" );
obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) );
Wait( 2 );
obj2 << Apply Preset( preset );
For more information and examples, see New Preset and Apply Preset in the Scripting Index (Help > Scripting Index).