In the plug in I have a class DeviceCT for definition of counter objects. The user can set the counter number (1 or 2) and a counter limit for each (from 1 and up).
The class definition looks like this
Code: Select all
class DeviceCT(object):
def Configure(self, ct = 1, ctl = 5):
nbr_list = []
for i in range(255):
nbr_list.append(str(i))
panel = eg.ConfigPanel(self)
ctr_ctrl = panel.Choice(ct, choices=['', '1', '2'])
panel.AddLine("Counter", ctr_ctrl)
ctr_limit = panel.Choice(ctl, choices=nbr_list)
panel.AddLine("Counter limit", ctr_limit)
while panel.Affirmed():
panel.SetResult(ctr_ctrl.GetValue(), ctr_limit.GetValue())
Thanks in advance, Walter