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 />

Column Object<br />

ColSex.AddValueLabelToList "M", "Male"<br />

ColSex.AddValueLabelToList "F", "Female"<br />

ColSex.CommitValueLabels<br />

ColAge.AddValueLabelToList "12", "Twelve"<br />

ColAge.AddValueLabelToList "13", "Thirteen"<br />

ColAge.AddValueLabelToList "14", "Fourteen"<br />

ColAge.AddValueLabelToList "15", "Fifteen"<br />

ColAge.AddValueLabelToList "16", "Sixteen"<br />

ColAge.AddValueLabelToList "17", "Seventeen"<br />

ColAge.CommitValueLabels<br />

Exclude() As Boolean<br />

Excludes the column. This operation is a toggle, meaning that calling them once sets them and calling them a<br />

second time unsets them. A return value of True indicates success, False indicates failure.<br />

GetCellVal(RowNumber As Integer) As String<br />

Returns the value of a given row of the column as a string. If the value is really a numeric, any conversion must<br />

be done by the caller. Visual Basic can do this automatically if the receiving object is defined as a numeric.<br />

GetDataSource() As Integer<br />

Attempts to find out of the column is regular data, instrument data, or contains a formula. It returns an integer<br />

that is part of the colDataSourceConstants definition.<br />

GetDataVector() As Variant<br />

Retrieves a vector with all the elements of a column, passed as a Variant.<br />

An example of using GetDataVector in Visual Basic is:<br />

’Get All the names from the "Name" column. Show the first 5 in a<br />

’messagebox<br />

Dim Col As <strong>JMP</strong>.Column<br />

Set Col = DT.GetColumn("name")<br />

nameArray = Col.GetDataVector<br />

For i = 0 To 4<br />

MsgBox (nameArray(i))<br />

Next i<br />

GetFormula() As String<br />

Retrieves the formula for the column in the form of a string.<br />

GetRowStateVectorData<br />

Returns the actual data that matches a rowstate criterion. This provides a one-call way to get the data, rather<br />

than using GetRowStateVector and then using the indices in a call to SetCellVal(RowNumber As Integer,<br />

Value as String). This provides a potential performance gain as well. The method declarations look like:<br />

GetRowStateVectorData(rowStateConstants state) As Variant<br />

An example of using GetRowStateVectorData in Visual Basic:<br />

Dim Col As <strong>JMP</strong>.Column<br />

Set Col = DT.GetColumn("height")<br />

Page 45

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

Saved successfully!

Ooh no, something went wrong!