Hi JMP Community,
I wrote a jmp script to assign a string to the selected rows in the graph builder.
The script will generate a wafer map for the X and Y coordinates. Users can select a region of a wafer and assign a string to the selected rows.
The script works fine, but it takes a very long time to assign values to more than 10k selected rows. Am using :Column[rows] = "string" logic.
Is there a way to optimize or assign it faster? Any feedback?
Code:
dt = current data table();
New Window( "",
modal,
V List Box(
hlistbox(
Panel Box( "Assign",
H List Box(
Text Box( "Enter :" ),
Spacer Box( size( 10, 0 ) ),
tp = Text Edit Box( "", <<setwidth( 60 ) )
),
Spacer Box( size( 10, 10 ) ),
H List Box(
Button Box( "Assign bin",
ndies = N Items( dt << getselectedrows );
Caption( "Processing... please wait", Font( "Arial Black" ), spoken( 0 ) );
Wait( 0 );
dt << label();
getbin = tp << get text();
rowind = dt << get selected rows;
:Bins[dt << get selected rows] = getbin;
Caption( "Assigned", Font( "Arial Black" ), spoken( 0 ) );
Wait( 0.2 );
Caption( remove );
Wait( 0 );
)
)
),
teb = Textbox()),
dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :X coord ), Y( :Y coord ), Color( :Bins ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
Local Data Filter( Add Filter( columns( :Bins ), Where( :Bins == "1" ), Display( :Bins, N Items( 7 ) ) ) )
)
)
)