public string TraceString (string input, string sSelectedMorphs)
{
//Guarantee that tracing has been turned on to XML form
string lpszResult = AmpleSetParameterDelegate (m_setup, "TraceAnalysis", "XML");
ThrowIfError (lpszResult);
// add any selected morphs
lpszResult = AmpleAddSelectiveAnalysisMorphsDelegate (m_setup, sSelectedMorphs ?? " ");
ThrowIfError (lpszResult);
// Do trace
m_ampleInitializeTrace (GetSetup ());
lpszResult = AmpleParseTextDelegate (GetSetup (), input, "n");
//don't bother returning the result, just the trace
ThrowIfError (lpszResult);
// remove any selected morphs
lpszResult = AmpleRemoveSelectiveAnalysisMorphsDelegate (m_setup);
ThrowIfError (lpszResult);
//Guarantee that tracing has been turned off
lpszResult = AmpleSetParameterDelegate (m_setup, "TraceAnalysis", "OFF");
ThrowIfError (lpszResult);
return m_ampleGetTrace (GetSetup ());
}