def main_selection(): curIdx = get_current_idx() if curIdx < 0: curIdx = 0 nextFeeder = get_next_feeder_from(curIdx) if nextFeeder is None: set_current_idx(0) return False sel = psypnp.getOption( "Check Feeder Height", "Check feeder for \n%s \n%s " % (nextFeeder.getName(), str(nextFeeder.getPart().getId())), ['Do it', 'Skip it', 'Find Feed', 'Find Part', 'Reset Count', 'Close']) if sel is None: # hard abort return False if sel == 0 and psypnp.should_proceed_with_motion(): # do it return check_feeder_heights() if sel == 1: # skip it increment_idx_counter(curIdx) return True if sel == 2: # by name return set_idx_by_feedname() if sel == 3: # by part return set_idx_by_part() if sel == 4: # reset count reset_idx_counter() return True return False
def main(): if psypnp.should_proceed_with_motion(): submitUiMachineTask(go_z)
def main(): if should_proceed_with_motion(): submitUiMachineTask(go_cam)