The XML extension definition file FluentDemo2.xml follows.
<extension name="FluentDemo2" version="1"> <guid>49B358FB-EAFB-4678-BBBD-82E949B46F70</guid> <author>Ansys, Inc.</author> <description>This extension demonstrates how to create a wizard in Fluent (.cas 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 2)" 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>ImportModel</onrefresh> <onupdate>CreateAnalysis</onupdate> </callbacks> <property name="velocity" caption="Velocity" control="float" default="3" /> </step> <step name="Results" caption="Results" version="1" layout="ResultsView@FluentDemo2"> <callbacks> <onrefresh>CreateReport</onrefresh> </callbacks> <property name="pressure" caption="Pressure Drop" control="text" readonly="true" /> </step> </wizard> </extension>
Definitions follow for elements in the XML extension definition file FluentDemo2.xml.
- 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
The element
<wizard>
has the attributename
set toSimple Analysis (Fluent Demo 2)
.- Step Definition
The element
<step>
defines each 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@FluentDemo2
. The custom layoutResultsView
is defined in the element<uidefinition>
.Any element
<property>
specifies a property and property attributes for 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 more information, see ???.