- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Optimize Assign values to selected rows
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 ) ) ) )
)
)
)
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Optimize Assign values to selected rows
Maybe this, but I did not see it being very slow, so maybe this isn't the problem:
dt<<begindataupdate;
:Bins[dt << get selected rows] = getbin;
dt<<enddataupdate;
Craige
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Optimize Assign values to selected rows
Maybe this, but I did not see it being very slow, so maybe this isn't the problem:
dt<<begindataupdate;
:Bins[dt << get selected rows] = getbin;
dt<<enddataupdate;
Craige
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Optimize Assign values to selected rows
Created:
Apr 19, 2023 11:18 AM
| Last Modified: Apr 19, 2023 8:21 AM
(879 views)
| Posted in reply to message from Craige_Hales 04-19-2023
@Craige_Hales it works