def update_named_values(names, values, message='', title='Update named values', evaluate=False): try: dialog = PropertyListForm(names, values) except Exception: values = ShowPropertyListBox(message, title, names, values) else: if dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow): values = dialog.values else: values = None if evaluate: if values: values = list(values) for i in range(len(values)): value = values[i] try: value = ast.literal_eval(value) except (TypeError, ValueError, SyntaxError): pass values[i] = value return values
def _update_named_values(names, values, message='', title='Update named values'): try: dialog = PropertyListForm(names, values) except Exception: values = ShowPropertyListBox(message, title, names, values) else: if dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow): values = dialog.values else: values = None return values