I want to select multiple segments when the partition model is shown. The selected segments will go into the badpopulation jmp file and the rest will go to the good population jmp file. But I don't know how to code it for multiple selection of the segments.
My code is as follows where it can make the separation into two categories:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
obj = Partition(
Y( :NPN1 ),
X( :PNP1, :PNP2, :PNP3, :PNP4, :NPN2, :NPN3, :NPN4 ),
Method( "Decision Tree" ),
Validation Portion( .2 )
);
obj << ShowGraph( 0 );
obj << SplitBest( 4 );
obj << Show Split Count( 1 );
obj << Show Split Prob( 1 );
Wait( .5 );
obj << on close(
If( N Items( dt << get selected rows() ) > 0,
dtTemp = dt << subset( invisible, selected rows( 1 ), selected columns( 0 ) );
dt << invert row selection;
dtSEG = dt << subset( invisible, selected rows( 1 ), selected columns( 0 ) );
filepath = "$Desktop";
Close( dtTemp, save( filepath || "\" || "badpopulation.jmp" ) );
Close(dtSEG, save(filepath || "\" || "goodpopulation.jmp"));
)
);
I want to add for multiple segments,suppose the highlighted ones and get them into one jmp file
(badpopulation) and rest data into other jmp file(goodpopulation) can anyone help me regarding this coding? 