Hello again. I looked at the "analysis" VB.NET sample at:
C:\Program Files\SAS\JMP\11\Samples\Automation\Visual Basic Samples\Analysis .NET\analysis.vb
Then, from the ControlChart_Click() procedure, I extracted code relating to IR charts (see below).
The code ran successfully...except for the 2 lines of code I added:
ccontrol2.LaunchSetIRChartParms(True, False, 2)
ccontrol2.LaunchSetKSigmaAlphaH(True, False, False, 3.0, 1.0)
Please advise on the correct syntax. Thanks!
'----------------------------------------------------------
'Analysis > Control Chart > IR > Individual Measurement
'----------------------------------------------------------
Sub ControlChart()
Dim app As JMP.Application
Dim doc As JMP.Document
Dim dt As JMP.DataTable
Dim ccontrol2 As JMP.ControlChart
'Start JMP
Set app = CreateObject("JMP.Application")
app.Visible = True
'Access document and retrieve pointer to underlying data table.
Set doc = app.OpenDocument("C:\Program Files\SAS\JMP\11\Samples\Data\Big Class.jmp")
Set dt = doc.GetDataTable
'Bring the data table to the foreground and make it the active table.
dt.Activate
'Create a specific type of analysis object (e.g., ControlChart),
' which is used to specify columns and then launch the analysis.
Set ccontrol2 = doc.CreateControlChart
'Select column for charting on the vertical axis.
ccontrol2.LaunchAddProcess ("height")
'Select column whose values label the horizontal axis.
ccontrol2.LaunchAddSampleLabel ("age")
'Select column for By Group processing.
ccontrol2.LaunchAddBy ("sex")
'Select the chart type that you want from jmpControlChartConstants (e.g., IR).
ccontrol2.LaunchSetChartType ((JMP.jmpControlChartConstants.jmpControlChartIR))
'For the IR Chart, set Individual Measurement option and KSigma parameters.
ccontrol2.LaunchSetIRChartParms(True, False, 2)
ccontrol2.LaunchSetKSigmaAlphaH(True, False, False, 3.0, 1.0)
'Run the analysis with columns previously specified through LaunchAdd___.
ccontrol2.Launch
End Sub