Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

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.

Fix import and subclass

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

Updated Parameter Units

New parameter types have been defined, and some have been removed.

+ uFloat
+ uInteger\*
+ uRadians
+ uDegrees
+ uPercent

- uNatural\*

*uInteger replaces uNatural

Update CheckParameters Function

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

Clone this wiki locally