This is an old revision of the document!


PHP's gd library is missing or unable to create PNG images


LESSON 12: Updating, importing and publishing a local submodel on Dinamica EGO



What will you learn?

* How to update a submodel
* How to importe an submodel
* How to publish an submodel



Updating Local Submodels

At any time, the user can add or remove inputs and outputs or even change the combination of functors defining the submodel.

The functor action bar of all functors contained inside a submodel script exhibits additional options for “exporting functor inputs and outputs”. Exporting a new input or output can be performed following the steps below:

First, click on the functor whose inputs or outputs will be exported.

Select the “export functor inputs and outputs” on the functor action bar and choose the input or outputs that will be exported. It is possible to define the input and output names and their corresponding descriptions. It is also possible to mark an exported input as advanced or optional. Optional inputs can also define an optional value that will be assigned to the port if no explicit value is provided.

Choose the “Submodel Options” submenu on the model toolbar and then click on “Apply Changes / Edit Submodel Properties”. That brings the submodel editor dialog where you can define a new name, description and icon for the submodel or reorder its inputs and outputs (or even remove some of them). Clicking “Ok” propagates the changes to all parts of your model (and dependent submodels) where the submodel is used.

Below you can see two examples of updating the inputs and output ports of a local submodel.

Example 1)

Example 2)

Beware that connected inputs cannot be exported. They must be disconnected first.

It is also worth noting that it is possible to safely rename inputs and outputs. The connections to the port will be maintained when the changes are propagated.

Tip: Dinamica EGO comes with a set of icons from the Fat Cow Icon Set that can be used to customize the local submodels created by users. The icons come in size 16×16 and 32×32 pixels. The overall color of the icon choosen is automatically used to define the color of the functor representing the submodel on the graphical interface. The set of icons are usually installed in the folder IconSamples in your Dinamica EGO installation folder

When updating a local submodel, the changes from all dependent local submodels will also be propagated. It means that updating a submodel always updates the whole chain of local submodels that uses that submodel as part of their definition.

Removing ports from a local submodel is also similar to updating the exported ports. You can remove the ports using “export functor inputs and outputs” option on the functor action bar and unchecking the corresponding port on the “Exported Ports” dialog or using the “Apply Changes / Edit Submodel Properties” dialog.

Changing the order of the inputs or output ports can only be done by editing the port list on the “Apply Changes / Edit Submodel Properties” dialog.