<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hallo Herr,
Ich lade JMP12 herunter und teste die Automatisierungsfunktion. Ich kopiere das C # JMPStarter-Projekt aus \ SAS \ JMPSW \ 12 \ Samples \ Automation \ Visual C # Sample.
Ich kann das Ergebnis als JPEG für Basic \ Distribution und Graph \ Control Chart speichern, aber für Model \ Fit Model ist ein Fehler aufgetreten.
Hat jemand es versucht und könnte Ihr Experiment teilen?
Hier ist der Code für Fit Model
private void fitModelButton_Click (Objektabsender, System.EventArgs e)
{
startJMP ();
fmDoc = myJMP.OpenDocument (jmpSampleDataDir + "tiretread.jmp");
fm = fmDoc.CreateFitModel ();
fm.LaunchAddY ("Abrieb");
fm.LaunchAddY ("Modul");
fm.LaunchAddY ("elong");
fm.LaunchAddY ("Härte");
fm.LaunchAddToEffectList ("Silica");
fm.LaunchAddToEffectList ("Silan");
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 ("Abrieb");
resp.SaveColumns (JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp.RowDiagnostics (JMP.fitModelRowDiagConstants.fitModelRDPress, true);
resp = fls.GetResponse ("Modul");
resp.SaveColumns (JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp = fls.GetResponse ("elong");
resp.SaveColumns (JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
resp = fls.GetResponse ("Härte");
resp.SaveColumns (JMP.fitModelSaveColumnConstants.fitModelSavePredFormula);
// Versuchen Sie, die Grafikausgabe zu speichern
int h = fls.GetGraphicItemByType ("Bildfeld", 1);
fls.CopyGraphicItem (h);
fls.SaveGraphicOutputAs (@ "D: \ FM.JPG", JMP.jmpGraphicsFormats.jmpJPEG);
}
Vielen Dank.
Frank
Hallo Brian,
Danke für Ihre Information. Ich werde es versuchen, wenn JMP 13 verfügbar ist.
Frank
Hallo Frank,
Normalerweise würden Sie das von GetGraphicItemByType erzeugte Handle nehmen und SaveGraphicItem aufrufen und das Handle übergeben. Leider scheint es einen Fehler bei der Ausgabe des Typs Fit Response zu geben, bei dem die Automatisierungsmethoden, die ein Grafikhandle verwenden, fehlschlagen. Ich habe dafür einen Tracking-Fehler erstellt, der in JMP 13.0 behoben wird. Es tut mir leid zu sagen, dass ich momentan keine andere Problemumgehung kenne.
Brian Corcoran
JMP-Entwicklung