in JMP 17: I have completed a dsd with many outputs (over 100 outputs). I can use fit definitive screening to open an interface and enter all the inputs, all the outputs and it proceeds to fit a model for each output. What i want to do now is "Run Model" (for each model) and then "Save script to datatable" (for each fit model). How would i write a script to do this? chatgpt suggests the following, but i keep getting errors that it can't resolve
// Assume the Fit DSD platform is open and assigned to a variable
// Replace "FitDSDObj" with the actual variable holding your platform reference
FitDSDObj = Current Report();
// Loop through each response modeling section
ForEach(
FitDSDObj << Report As List,
ResponseSection,
// Check if this section has a "Run Model" button
If(
ResponseSection << Contains("Run Model"),
// Click "Run Model" button
(ResponseSection << Button Box("Run Model")) << Click,
// Wait briefly to allow model to fit
Wait(0.5);
// Click "Save Columns to Data Table" (could also be labeled "Save Prediction Formula" or similar)
If(
ResponseSection << Contains("Save Columns"),
(ResponseSection << Button Box("Save Columns")) << Click,
// Fallback if specific button names are known
If(
ResponseSection << Contains("Save Prediction Formula"),
(ResponseSection << Button Box("Save Prediction Formula")) << Click
)
)
)
);