Your column names contain characters that JMP will try to execute, rather than use them as part of the name. Therefore I had to add in a :Name() function to force JMP to interpret the complete value as a name. See the script below.
Note: the dt = and dtLimits = statements have been changed to look for already opened data tables. You may need to change them back to using an open() function.
// Open table to have limits set on
dt = data table("raw data");
dtLimits = data table("Spec limit");
// Get a list of all of the numeric columns in the measurment data table
colNames = dt << get column names( numeric, string );
// Loop across the Limits table and apply the findings to data table
For( i = 1, i <= N Rows( dtLimits ), i++,
// If a column in the measurement data table has the same name as the current
// Limits data table column "Parameter" has, then process the data
colNamesPosition = Loc( colNames, dtLimits:Parameter[i] );
If( N Rows(colNamesPosition) > 0,
Eval(
Substitute(
Expr(
__col__ << set property(
"Spec Limits",
{LSL( __LSL__ ), USL( __USL__ ), Target( __Target__ ), Show Limits( 1 )}
)
),
Expr( __col__ ), Parse( "dt:Name(\!"" || colNames[colNamesPosition[1]] || "\!")" ),
Expr( __LSL__ ), dtLimits:LSL[i],
Expr( __USL__ ), dtLimits:USL[i],
Expr( __Target__ ), dtLimits:Target[i]
)
)
);
);
// Run Variability Charts
Variability Chart( Y( :Name("TWNB_10/10$Vtlin%V"), :Name("TWNB_10/10$Idlin%uA/um") ), X( :wafer ) );
Jim