Tip: JSL choices for properties are the same as those in the Column Properties menu in the Column Info window. The arguments for each property correspond to the settings in the Column Info window. An easy way to learn the syntax is to establish the property that you want in the Column Info window first, and then use Get Property to view the JSL. See The Column Info Window in the Using JMP book for details about each property.
Data columns have numerous optional metadata attributes that can be set, queried, or cleared using the messages Get Property, Set Property, and Delete Property.
col << Set Property( "propertyName", {argument list} );
col << Get Property( "propertyName" );
col << Delete Property( "propertyName" );
The name of the property in question is always the first argument for Set Property, and what is expected for subsequent arguments depends on which property you set:
•
|
Get Property and Delete Property always take a single argument, which is the name of the property.
|
•
|
Get Property returns the property’s settings. Delete Property completely removes the property from the column.
|
•
|
If you want to set several properties, you need to send several separate Set Property messages. You can stack several messages in a single JSL statement if you want.
col << Set Property( "Axis",{Min(50), Max(180)} )<< Set Property( "Notes", "to get proportions" );
To get a property’s value, send a Get Property message whose argument is the name of the property that you want:
Column("ratio") << Get Property( "axis" ); // return axis settings
dt << Set Label Columns( col1, col2, col3 );
dt << Set Label Columns();
One way to do this is to use expressions. In the following example, the Eval Expr() function evaluates and replaces any variable wrapped in the Expr() function with its value. The outer Eval() function evaluates the entire statement after the replacement has occurred.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// open a sample data table
lLimit = 55;
uLimit = 70;
tLimit = 62.5;
// assign desired spec limits
Eval(
Eval Expr(
:height << Set Property(
// store the limits in the Spec Limits column property
"Spec Limits",
{LSL( Expr( lLimit ) ), USL( Expr( uLimit ) ), Target( Expr( tLimit ) ),
Show Limits( 0 )}
)
)
);
Table 8.4 shows examples for setting and getting popular column properties. See The Column Info Window in Using JMP for more information about each property.