14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14 Extending JMP 503<br />

OLE Automation<br />

}<br />

//pointer that is returned is then attached to our Doc dispatch<br />

//driver class that uses the IJMPDoc interface specification.<br />

m_Doc.AttachDispatch(m_DispDriver.OpenDocument(<br />

"C:\\JMPDATA\\BIGCLASS.JMP"));<br />

//First, call CreateBivariate on the Doc interface to create<br />

//a dispatch object to a Bivariate analysis. If there is already<br />

//a previous dispatch interface in m_Bivar, MFC releases it<br />

//in AttachDispatch.<br />

m_Bivar.AttachDispatch(m_Doc.CreateBivariate( ));<br />

//Now add Height and Weight as the columns to analyze<br />

m_Bivar.LaunchAddX("Height");<br />

m_Bivar.LaunchAddY("Weight");<br />

//Launch the analysis<br />

m_Bivar.Launch( );<br />

//Create a FitLine. Since the Fit can be automated, attach the dispatch<br />

//pointer that is returned from FitLine( ) to a DispatchDriver object<br />

m_FitLine.AttachDispatch(m_Bivar.FitLine( ));<br />

//Now do a few more fits. This example does not automate these fit<br />

//objects, although they do support automation.<br />

m_Bivar.FitPolynomial(3.0);<br />

m_Bivar.FitSpline(1000.0);<br />

//Now manipulate the first FitLine object<br />

m_FitLine.ConfidenceFit(TRUE);<br />

m_FitLine.ConfidenceIndividual(TRUE);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!