The file WizardDemo.xml follows. For both the elements
<extension> and <wizard>, the
attribute context is set to
ElectronicsDesktop.
<extension name="Wizard Demo" version="1">
<author>Ansys, Inc.</author>
<guid shortid="ElectronicsWizard">819d1fd2-17c2-493a-ad6a-ee608356229a</guid>
<script src="callbacks.py" />
<interface context="ElectronicsDesktop">
<images>images</images>
</interface>
<wizard name="Wizard Demo" caption="Wizard Demo" version="1" context="ElectronicsDesktop" icon="antImage">
<description>Simple example of a wizard in Electronics Desktop</description>
<step name="Step1" version="1" caption="Design">
<description>Create geometry</description>
<propertygroup name="dim" caption="Dimensions (mm)" persistent="False" parameterizable="False">
<property control="float" name="width" caption="Width" persistent="False" parameterizable="False" default="0.4" />
<property control="float" name="height" caption="Height" persistent="False" parameterizable="False" default="1.7" />
</propertygroup>
<propertygroup name="offset" caption="Offset for duplication (mm)" persistent="False" parameterizable="False">
<property control="float" name="offset" caption="Offset" persistent="False" parameterizable="False" default="0.3" />
</propertygroup>
<callbacks>
<onupdate>OnUpdate1</onupdate>
<onreset>OnReset1</onreset>
</callbacks>
</step>
<step name="Step2" version="1" caption="Setup">
<description>Define boundary conditions</description>
<propertygroup name="bc" caption="Boundary Conditions (Ohm)" persistent="False" parameterizable="False">
<property control="float" name="resistance" caption="Full Resistance" persistent="False" parameterizable="False" default="50." />
<property control="float" name="reactance" caption="Full Reactance" persistent="False" parameterizable="False" default="0." />
</propertygroup>
<callbacks>
<onupdate>OnUpdate2</onupdate>
</callbacks>
</step>
</wizard>
</extension>
- Step Definition
The element
<step>defines a step in the wizard. This wizard has two steps:Step1andStep2.In the first step, the first two dimensions define and create a rectangle. The first rectangle is then automatically duplicated and set at an offset along the Y axis, which is defined by the third dimension.
In the second step, two boundary conditions are automatically created.
For each step, the element
<callbacks>specifies callbacks to functions defined in the script callbacks.py. For property and callback descriptions, see Electronics Desktop Wizard Review.