This repository was archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Updating Older Wizards
Oliver edited this page Sep 26, 2016
·
5 revisions
Older wizards that subclass HelpfulFootprintWizardPlugin will need some slight adjustments to work with the upgraded wizard scripting interface.
A slightly different import process is required.
import HelpfulFootprinWizardPlugin
class MyWizard(HelpfulFootprinWizardPlugin.HelpfulFootprinWizardPlugin):
# code goes here
becomes
import FootprintWizardBase
class MyWizard(FootprintWizardBase.FootprintWizard):
# code still goes here
New parameter types have been defined, and some have been removed.
+ uFloat
+ uInteger\*
+ uRadians
+ uDegrees
+ uPercent
- uNatural\*
*uInteger replaces uNatural
The CheckParameters() function should no longer contain code for validating a single parameter. The functions CheckParamInt and CheckParamBool are no longer supported. Instead, these checks are performed automatically for each parameter, if limits (etc) are specified for that parameter.
Old Code
def GenerateParameterList(self):
self.AddParam("Pads", "n", self.uNatural, 100)
self.A