Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lesson_19 [2019/08/27 16:27]
argemiro ↷ Page name changed from lesson_19 to lesson_22
lesson_19 [2020/02/19 14:12]
argemiro [The Tool]
Line 1: Line 1:
 +{{ :​logo_logo.png?​400 |}}
 +\\
 +=====The wizard editor in Dinamica EGO=====  ​
 +\\
 +\\
 +==== What will you learn? ====
 +\\
 +  * Dinamica EGO wizard tools
 +  * Creating Wizards
 +  * Formatting Wizards ​
 +\\
 +==== Wizards ====
 +\\
 +A Wizard is an easy way to create a presentation for a model developed in Dinamica EGO with formatted text, images and other graphical features. In a Wizard it is also possible alter the models'​ inputs to run an easy simulation without an advanced understanding of the Dinamica GUI and its functors. ​
 +\\
 +A Wizard Tutorial is a sequence of pages containing formatted text, tables, images, diagrams, animations, embedded videos or any other internet browser compatible technology inserted by the author. Each page can contain general information about the model and the simulation inputs. Simulation inputs can be directly linked to script inputs, making it a fast and easy way to set parameters and run a simulation.
 +\\
 +\\
 +{{ :​wizard:​wizard_presentation.png?​nolink&​900 |Wizard overview}}
 +\\
 +{{ :​wizard:​wizard_model_correspondence.png?​nolink&​800 |Model-wizard correspondence}}
 +\\
 +An author can create his own Wizard Tutorial to present and explain its concepts and ideas. The Wizard Editor is a powerful tool to create text, format information and illustrations visually, include tables, and set inputs/​outputs. The author selects model script functors to include in the Wizard so not all functors are visible to Wizard users. ​
 +\\
 +\\
 +{{ :​wizard:​editor1.png?​nolink&​700 |Wizard editor in use}}
 +\\
 +\\
 +==== The Tool ====
 +\\
 +The Wizard should be a logical sequence of pages, each using a graphical area to convey information and possibly ports linked to the model. This is a very clear idea that can be seen in the wizard editor. The following videos provide directions on using the wizard tool:
 +\\
 +{{youtube>​_Jc61ARsHuA?​medium}}
 +\\
 +Here is how to run a Wizard in the current interface:
 +\\
 +{{youtube>​I7DPear5yao?​medium}}
 +\\
 +To open the Wizard tool click on the edit bar in the menu:
 +\\
 +{{wizard:​editor_menu.png?​nolink&​|Editor button in menu}}
 +\\
 +It has an intuitive interface that we are going to learn how to use through the following examples.
 +\\
 +{{wizard:​editor_interface.png?​nolink&​|Wizard editor intuitive interface}}
 +\\
 +=== Simple Wizard ===
 +\\
 +Lets start with a quick example where we create a wizard for a script that performs only a simple map algebra operation.
 +\\
 +We are going to need the functors:
 +  * [[Load Map]]
 +  * [[Calculate Map]]
 +  * [[Number Map]]
 +  * [[Save Map]]
 +\\
 +=== Building the model ===
 +\\
 +Assemble the functors according to the following picture.
 +\\
 +\\
 +{{:​wizard:​model.png?​nolink&​|Simple model}}
 +\\
 +\\
 +In the [[Calculate Map]] we are going to perform a simple operation with the input that, for values equals to **null**, set them to **1** , **0** to the others.
 +\\
 +\\
 +{{:​wizard:​expression.png?​nolink&​|Expression used to filter the input map null values}}
 +\\
 +\\
 +=== Creating the Wizard ===
 +\\
 +To create a wizard o need first to save your model. Save it with XML extension and open the wizard
 +editor. ​
 +
 +== Wizard Pages ==
 +
 +In the Dinamica Wizard Editor toolbar click in the wizard icon to input ports.
 +
 +{{:​wizard:​create_page.png?​nolink&​|Create new wizard page icon}}
 +
 +It is necessary to give a page a name, but it is only for identification. The tutorial user will not
 +see this name:
 +
 +{{:​wizard:​page_name.png?​nolink&​|Wizard page valid name}}
 +
 +Now lets edit this page and add some text. To edit a page can just click on edit wizard at the 
 +icon wizard:
 +
 +{{:​wizard:​edit_wizard.png|}}
 +
 +The page editor will be showed up:
 +
 +{{:​wizard:​page_editor1.png?​nolink&​600|Page Editor}}
 +
 +Indeed, it is a visual text editor, "what you see is what you get" style. Lets add some text about
 +our model.
 +
 +{{:​wizard:​page_text1.png?​nolink&​|Page text example}}
 +
 +== Formatting ==
 +
 +We can use the editor features to add some formatting:
 +
 +{{:​wizard:​page_text_formatted.png?​nolink&​|Page text example formatted}}
 +
 +By clicking ok the page will be visualized in the Wizard Editor:
 +
 +{{:​wizard:​editor2.png?​900|}}
 +
 +== Another Page ==
 +
 +Now lets add another page. You already know how to proceed.
 +
 +{{:​wizard:​create_page2.png?​nolink&​|Second page created}}
 +
 +In this second page we are going to allow the user to set the input map file path for the filtering.
 +For now, lets add a text about it and soon we will add the input in the wizard.
 +
 +{{:​wizard:​editor3.png?​900|}} {{:​wizard:​wizr_editor.png?​900|}}
 +
 +
 +== Adding Inputs ==
 +
 +Now, lets add one input to our wizard. To do this, double click the second page to edit it. In the 
 +page inputs area, click in the **Add input** button to add a new input.
 +
 +{{:​wizard:​add_input.png?​nolink&​|Add input button}}
 +
 +The **Select functor port** window will open up. In this window, the [[Load Map]] functor present in our model can be
 +seen. Select page 00 and press ok.
 +
 +{{:​wizard:​functor_selector.png?​nolink&​|Functor selector window where we select functors whose inputs will be exported to the wizard}}
 +
 +<note tip>Tip: Assign meaningful alias to each of the functors. It is easier to identify them while selecting functors and ports.</​note>​
 +
 +Now, you can edit the port title and description. This is an important feature because ports for a functor
 +have all the same title and description. With the wizard you can specify this information with an intuitive
 +text, something that explain better what is this input for your simulation.
 +
 +{{:​wizard:​input_description.png?​nolink&​|Input title and description editor}}
 +
 +Lets add a new title and description that explains better this input:
 +
 +{{:​wizard:​input_description_edited.png?​nolink&​|Input title and description edited}}
 +
 +After clicking ok the input will appear in the page inputs area:
 +
 +{{:​wizard:​page_inputs_new.png?​nolink&​|Input added to the page}}
 +
 +If you select an input from this area the buttons will be available. Through this you can remove the selected
 +input, edit its information again (modify title and description) or change the inputs order (move it up or down)
 +when there are more than one input.
 +
 +{{:​wizard:​page_input_buttons.png?​nolink&​|Page input buttons}}
 +
 +
 +== Testing the Wizard == 
 +
 +To test the wizard you have made you can click the button **Run Wizard** in the tool bar:
 +
 +{{:​wizard:​test_wizard_button.png?​nolink&​|Test wizard button}}
 +
 +After clicking Run Wizard you must select the model that will contain the wizard and run the model.
 +
 +{{:​wizard:​run_model.png|}}
 +
 +Clicking **Cancel** you can keep editing the Wizard.
 +
 +<note important>​Remember to save the wizard every time you close the Wizard Editor. Once finished the Wizard it
 +is also important to save your model.</​note>​
 +
 +== A third page ==
 +
 +Now you know the process to create a page and add an input. Lets do it faster. In the third page we are going
 +to add some information about the output map and after export the [[Save Map]] **Filename** port we are going
 +to add it as an input to the third page.
 +
 +We create the page and add information.
 +
 +{{:​wizard:​third_page_edit.png?​nolink&​|Editing third page text}}
 +{{:​wizard:​third_page_created.png?​nolink&​|Third page created}}
 +
 +Now add an input, choose the [[Save Map]] functor (you need to click in the wizard tool on the save map) and then his input port named "​Filename"​.
 +
 +{{:​wizard:​save.png|}} {{:​wizard:​next_step.png|}}
 +
 +After that you have to click in Edit Wizard.
 +
 +{{:​wizard:​edit_wizard.png|}}
 +
 +Choose a name for the input and set a meaningful title and description.
 +
 +{{:​wizard:​output_description.png?​nolink&​|New description to Save Map Filename port}}
 +{{:​wizard:​third_page_inputs.png?​nolink&​|Third page inputs}}
 +
 +== Finishing the Simple Wizard ==
 +
 +You have just created a complete wizard tutorial for your model! Save the wizard and close the editor. It is also 
 +important to save your model again.
 +
 +Now, every time an user opens your model, he will be prompted about running the wizard tutorial you have created.
 +
 +{{:​wizard:​run_wizard_prompt.png?​nolink&​|Prompt for running a wizard}}
 +
 +It is also possible to run the wizard tutorial through the **Run Wizard** button in the tool bar.
 +
 +{{:​wizard:​run_wizard_button_toolbar.png?​nolink&​|Run wizard button in tool bar}}
 +\\
 +\\
 +\\
 +☞[[lesson_20|Next:​ R Coupling]]
 +\\
 +☞[[:​guidebook_start| Back to Guidebook Start]]
 +