To exchange models with others or to safeguard your modeling progress the Export Library and Import Library functionality is provided.
The export mechanism is provided by the Tree View. Right-click on the library you wish to export and choose Export Library... to start the export process.
Only top-level libraries can be exported.
Be aware that resolving these inconsistencies is important to ensure that the exported libraries are working on other MLDesigner installations.
Intellectual property can be protected if needed. You can do this by clearing the check mark for Include *.pl Files and adding a check mark to Include *.o Files, in the Export Library dialog. This ensures that only compiled object files are exported to the archive. Note that precompiled systems are platform dependent. It is not possible to export precompiled objects and execute the simulation on another platform. To do this the entire library must be recompiled after being exported and imported again.
With extremely large systems the size of the archive could be an inhibiting factor. To reduce the size of the archive exclude the .htm online documentation and the .o files.
The Import Library option is only available on the model bases My Libraries and Shared Libraries in the Tree view.
Right-click on My Libraries or Shared Libraries and choose Import Library... to start the import process.
It's possible that the archive you are trying to import contains more than one model with the same Global ID (GID).
A model's GID is supposed to be unique and cannot be directly influenced by the user. However, it is possible (due to software bugs in previous versions of MLDesigner) that there is more than one model with the same GID. The import will detect these models and generate new GIDs for them. A warning message will inform you of this. It will also list the models which possibly contain references to the models with now regenerated GIDs (which is also put out to the Log window for later reference).
To repair these models proceed as follows:
The warning message and the log window above (fig. 1 and 2) tell you that the models $MLD_USER/StopWaitExample/Receiver and $MLD_USER/StopWaitExample/Transmitter had the same GID which caused the StopWaitSystem to break.
Once opened, the error in the StopWaitSystem (fig. 3 and 4) is apparent. The Receiver instance has an unconnected port, its tooltip shows that it's actually an instance of Transmitter, and the Parameters shown in the Instance Properties are actually those of the Transmitter.
To fix this, both the Receiver and the Transmitter instance have to be replaced with a new instance of the respective model. This can be easily done by dragging the appropriate model from the Tree View directly onto the instance to be replaced.
In this example, replacing the Transmitter instance is enough, it will cause the correct GID to be used. However, just replacing the Receiver instance is not enough. Unlike the Transmitter, the Receiver actually has two output ports (not two input ports) and only one Parameter AckLength (not two, TimeoutPeriod and MaximumQueueSize). So the connection to Channel#2 has to be remade and the value of the Parameter AckLength has to be set properly (fig. 5).