Hello Sir,
I am downloading JMP12 and testing the automation function. I copy the C# JMPStarter project from \SAS\JMPSW\12\Samples\Automation\Visual C# Sample.
I can save result as jpeg for Basic\Distribution and Graph\Control Chart but failed for Model\Fit Model.
Does anyone try it and could share your experiment?
Here is the code for Fit Model
private void fitModelButton_Click(object sender, System.EventArgs e)
{
startJMP();
fmDoc = myJMP.OpenDocument(jmpSampleDataDir + "tiretread.jmp");
fm = fmDoc.CreateFitModel();
fm.LaunchAddY("abrasion");
fm.LaunchAddY("modulus");
fm.LaunchAddY("elong");
fm.LaunchAddY("hardness");
fm.LaunchAddToEffectList("silica");
fm.LaunchAddToEffectList("silane");
fm.LaunchAddToEffectList("sulfur");
fm.LaunchAddMacroEffect(JMP.fitModelMacroEffectConstants.fitModelEffectResponseSurface);
fm.LaunchSpecifyIntercept(true);
fm.LaunchSpecifyEmphasis(JMP.fitModelEmphasisConstants.fitModelEmphasisScreening);
fm.LaunchSpecifyPersonality(JMP.fitModelPersonalityConstants.fitModelPerLS);
fls = (JMP.FitLeastSquares) fm.Launch();
fls.ContourProfiler(true);
resp = fls.GetResponse("abrasion");
resp.SaveColumns(JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp.RowDiagnostics(JMP.fitModelRowDiagConstants.fitModelRDPress, true);
resp = fls.GetResponse("modulus");
resp.SaveColumns(JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp = fls.GetResponse("elong");
resp.SaveColumns(JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp = fls.GetResponse("hardness");
resp.SaveColumns(JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
//Try to save Graphic Output
int h = fls.GetGraphicItemByType("picture box", 1);
fls.CopyGraphicItem(h);
fls.SaveGraphicOutputAs(@D:\FM.JPG, JMP.jmpGraphicsFormats.jmpJPEG);
}
Thank you.
Frank