The file FluentDemo1.xml follows. For both the elements
<extension>
and <wizard>
,
the attribute context
is set to
Fluent
.
<extension name="FluentDemo1" version="1"> <guid>A0A3E28C-E094-4B2D-8A91-A0B0884D1AE2</guid> <author>Ansys, Inc.</author> <description>This extension demonstrates how to create a wizard in Fluent (.msh file import).</description> <script src="main.py" /> <interface context="Fluent"> <images>images</images> </interface> <uidefinition> <layout name="ResultsView"> <component name="Title" topAttachment="" topOffset="10" leftAttachment="" leftOffset="10" rightAttachment="" rightOffset="10" bottomOffset="10" bottomAttachment="Properties" widthType="Percentage" width="100" heightType="FitToContent" height="200" componentType="startPageHeaderComponent" /> <component name="Properties" topAttachment="Title" leftAttachment="" leftOffset="10" rightAttachment="" rightOffset="10" bottomAttachment="Report" bottomOffset="10" widthType="Percentage" width="100" heightType="Percentage" height="20" componentType="propertiesComponent" /> <component name="Report" topAttachment="Properties" leftAttachment="" leftOffset="10" rightAttachment="" rightOffset="10" bottomAttachment="Chart" bottomOffset="10" widthType="Percentage" width="100" heightType="Percentage" height="40" componentType="helpContentComponent" /> <component name="Chart" topAttachment="Report" leftAttachment="" leftOffset="10" rightAttachment="" rightOffset="10" bottomAttachment="Submit" bottomOffset="10" widthType="Percentage" width="100" heightType="Percentage" height="40" componentType="chartComponent" /> <component name="Submit" topAttachment="Chart" leftAttachment="" leftOffset="10" rightAttachment="" rightOffset="10" bottomAttachment="" bottomOffset="10" widthType="Percentage" width="100" heightType="FitToContent" height="50" componentType="buttonsComponent" /> </layout> </uidefinition> <wizard name="Simple Analysis (Fluent Demo 1)" version="1" context="Fluent" icon="wizard_icon"> <description>Generate the mesh and solve the analysis.</description> <step name="Analysis" caption="Analysis" version="1"> <callbacks> <onrefresh>ImportMesh</onrefresh> <onupdate>CreateAnalysis</onupdate> </callbacks> <property name="velocity" caption="Velocity" control="float" default="3" /> </step> <step name="Results" caption="Results" version="1" layout="ResultsView@FluentDemo1"> <callbacks> <onrefresh>CreateReport</onrefresh> </callbacks> <property name="pressure" caption="Pressure Drop" control="text" readonly="true" /> </step> </wizard> </extension>
- Custom Layout Definition
The element
<uidefinition>
defines a custom layout namedResultsView
for the Fluent wizard. It is made up of five custom components:Title
,Properties
,Report
,Chart
, andSubmit
. TheProperties
,Report
, andChart
components are views, and theSubmit
component is a button.- Wizard Definition
In the element
<wizard>
, the attributename
is set toSimple Analysis (Fluent Demo 1)
.- Step Definition
The element
<step>
defines a step in the wizard. This wizard has two steps:Analysis
andResults
. For each step:The attribute
layout
specifies the custom layout to apply to the step. For the stepResults
,layout
is set toResultsView@FluentDemo1
. The custom layoutResultsView
is defined in the element<uidefinition>
.Any element
<property>
specifies a property and property attributes to be used in the step.For the step
Analysis
, the propertyvelocity
is defined. The attributecaption
is set tovelocity
.For the step
Results
, the propertypressure
is defined. The attributecaption
is set toPressure
.
The element
<callbacks>
specifies callbacks to functions defined in the script main.py. For callback descriptions, see Reviewing the Wizard in FluentDemo1.