There seems to exist an internal order of distributions that is maintained whatever the outcome of the automatic sorting. If that order is stable it can be hardcoded like in the example below. However, beware that the number of distributions as well as the order (and spelling?) may change in future versions of JMP.
This code works for me in JMP 11. The selected distributions and parameter estimates are stored in an associative array as keys and values respectively, but there are of course other options (e.g. data tables).
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = Distribution( Continuous Distribution( Column( :weight ), Fit Distribution( All ) ), Histograms Only );
// List of the distribution names in their "true" order
L = {"Normal", "LogNormal", "2 parameter Weibull", "Exponential", "Gamma", "Johnson Su", "Johnson Sl", "Generalized Logarithm", "Extreme Value",
"Normal 2 Mixture", "Normal 3 Mixture"};
rdist = Report( dist );
// Add button with script. Click after manual selection.
rdist << prepend(
Button Box( "Click when done",
// Find the true position of selected items (not what the automatically sorted table shows)
m = [];
For( i = 1, i <= 11, i++,
m = m || (rdist[Outline Box( "Compare Distributions" )][1][1] << get( i ))
);
seldist = If( N Row( Loc( m ) ) > 1,
L[Loc( m )],
Eval List( {L[Loc( m )]} )
); // Selected distribution(s)
aa = Associative Array(); // For storing parameter estimates
// Insert values
For( i = 1, i <= N Row( Loc( m ) ), i++,
aa << insertitem( seldist[i], Matrix( rdist[Outline Box( "Fitted " || seldist[i] )][Number Col Box( "Estimate" )] << get ) )
);
Show( Seldist );
Show( aa );
)
);