def load(self): all_cases = self._case_model.getAllItems() selected_case = all_cases[self._case_combo.currentIndex()] realizations = self._active_realizations_model.getActiveRealizationsMask() iteration = self._iterations_model.getActiveIteration() LoadResultsModel.loadResults(selected_case, realizations, iteration)
def load(self): all_cases = self._case_model.getAllItems() selected_case = all_cases[self._case_combo.currentIndex()] realizations = self._active_realizations_model.getActiveRealizationsMask( ) iteration = self._iterations_model.getActiveIteration() LoadResultsModel.loadResults(selected_case, realizations, iteration)
def load(self): all_cases = self._case_model.getAllItems() selected_case = all_cases[self._case_combo.currentIndex()] realizations = self._active_realizations_model.getActiveRealizationsMask() iteration = self._iterations_model.getValue() try: if iteration is None: iteration = '' iteration = int(iteration) except ValueError as e: print('Expected a (whole) number in iteration field, got "%s". Error message: %s.' % (iteration, e)) return False loaded = LoadResultsModel.loadResults(selected_case, realizations, iteration) if loaded > 0: print('Successfully loaded %d realisations.' % loaded) else: print('No realisations loaded.') return loaded