Hi All,
I've trying to build a form to create and delete print Sets.
I've 2 main issues:
I'm able to create a print set but I cannot access it's content unless I restart the Form. I get the errors below (depending if I'm defining the view_set variable or not)
This is the code of the function:
def DisplaySheetsInSet (self, sender, args):
self.curItem = CurrentSetsListBox.SelectedItem
PrintSetForm_Load
try:
#view_set=[]
for i in PrintSetForm.ViewSets:
if i.Name == str(self.curItem):
view_set = i
else:
continue
Sheets=[sheet.Name for sheet in view_set.Views]
SheetsLb.BeginUpdate()
SheetsLb.Items.Clear()
for sheet in Sheets:
SheetsLb.Items.Add(sheet)
SheetsLb.EndUpdate()
except Exception as e:
popup (str(e))
2) I'm able to delete print sets once. If I try do delete another one I get the following error and I need to restart the form ( code for the function that deletes the print sets shown below)
I've tried to build a function to restart/refresh the Form but it doesn't work (below):
Any ideas or suggestions?
Thank you.