C.10.3. Tutorial: Creating a Custom Wizard

This tutorial describes the steps needed to develop a custom wizard. Before proceeding, complete the tutorial Creating a Custom Task.

View the completed TaskML file for this tutorial.

Steps

Copy the file MechanicalWizard\StressWizard.xml to a file named CustomWizard.xml in the same folder as the file Insert100psi.xml created in the previous tutorial.

Change "InsertStructuralLoad.xml" to "Insert100psi.xml" in the Merge element:

<merge src="Insert100psi.xml" /> 

This merge makes the custom task definition available to this wizard. Note that the URI to the file containing the task is relative to the location of the file containing the wizard. See URI Address and Path Considerations.

Modify the strings section as follows:

<strings>
    <language xml:lang="en-us">
        <string id="Title_Caption">
            Tutorial Wizard
        </string>
        <string id="Title_Description">
            Demonstrates a custom wizard with a task for inserting a 100 psi Pressure.
        </string>
    </language>
</strings> 

Change "InsertStructuralLoad" to "Insert100psi" in the taskref element:

<taskref task="Insert100psi"/> 

This taskref adds the task to the body of the wizard by its id.

Save the file.

In the Mechanical application, click the Choose Wizard option from the top of a standard wizard.

Choose "browse for a custom wizard definition.".

Select the file CustomWizard.xml.

Test the Insert Pressure task. The task should behave in the same way as the standard Insert Loads task but with specific instructions for defining a 100 psi pressure.