I'm working on something similar. I needed to get the published python code so I could save it as a .py and use it later.
dt = Open( "/Users/bywing/irisr.csv",End Of Field( Tab, CSV( 1 ) ) );//make sure preferences open CSV as standard CSV
model = dt << Fit Model(
Y( :Name ),
Effects( :Sepal length, :Sepal width, :Petal length, :Petal width ),
Personality( Nominal Logistic ),
Run
);
fd = model << Publish Probability Formulas;
fd << Generate Python Code;
Wait( 0 );
cw = Window( "Python Code Output" );
ed = cw[Script Box( 1 )];
code = ed << get text;
Save Text File( "irismodel.py", code ); // saves generated python code as python script);
Window( "Report: Formula Depot" ) << close window;
Note, this script is working with a CSV version of the Iris data, not a JMP table. not something operational, just a short POC
JMP Systems Engineer, Health and Life Sciences (Pharma)