Defining FluentDemo1

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 named ResultsView for the Fluent wizard. It is made up of five custom components: Title, Properties, Report, Chart, and Submit. The Properties, Report, and Chart components are views, and the Submit component is a button.

Wizard Definition

In the element <wizard>, the attribute name is set to Simple Analysis (Fluent Demo 1).

Step Definition

The element <step> defines a step in the wizard. This wizard has two steps: Analysis and Results. For each step:

  • The attribute layout specifies the custom layout to apply to the step. For the step Results, layout is set to ResultsView@FluentDemo1. The custom layout ResultsView 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 property velocity is defined. The attribute caption is set to velocity.

    • For the step Results, the property pressure is defined. The attribute caption is set to Pressure.

  • The element <callbacks> specifies callbacks to functions defined in the script main.py. For callback descriptions, see Reviewing the Wizard in FluentDemo1.