14.03.2014 Views

Automation Reference - JMP

Automation Reference - JMP

Automation Reference - JMP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Application Object <strong>Reference</strong> for Automating <strong>JMP</strong><br />

Automating <strong>JMP</strong> through Visual Basic<br />

DocOpen = True<br />

‘Now, create the control chart.<br />

‘This one is keyed to the data in "Column 1".<br />

‘If 5 or more values are changed,<br />

‘<strong>JMP</strong> should generate a new Chart and save it as a<br />

‘PNG file to disk.<br />

‘The PNG file can be viewed with Internet Explorer.<br />

Set CChart = <strong>JMP</strong>Doc.CreateControlChart<br />

CChart.LaunchAddProcess "Column 1"<br />

CChart.LaunchAddSampleUnitSize 5<br />

CChart.LaunchSetChartType jmpControlChartVar<br />

CChart.Launch<br />

CChart.SaveGraphicOutputAs "C:\ControlChart.png", jmpPNG<br />

End If<br />

End Sub<br />

This sample reloads the data every time there are 10 changes to the Excel Workbook. First, it removes <strong>JMP</strong> Control<br />

Charts and data tables that were previously created. Next, it loads the new data and creates a Control Chart.<br />

This sample works best for small amounts of data. If very large Excel files are involved, this approach is not efficient<br />

because of the reloading of the table into <strong>JMP</strong>.<br />

Page 8

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

Saved successfully!

Ooh no, something went wrong!