Exporting Restricted Models
Overview
FlexSim models are often made by one person and then shared with the end user. Some model makers consider model logic (FlexScript code and Process Flows) as intellectual property. In these cases, the model maker wants to provide a working model to the end user without revealing their logic.
The best way to hide logic is to use a C++ DLL. The model can then call functions in the DLL without the user being able to see how it works. This is especially helpful for logic that is used in multiple models. You can create a module that encapsulates your logic and share that will all end users. For more information on creating a DLL, see the Module SDK Quick Start topic.
The second best way to hide logic is to export a restricted model. You can export any model as a restricted model. To begin, select File in the main menu and choose Export Restricted Model.... This will open the Export Restricted Model dialog:
Choose which restrictions to place on the exported model, and click the Export... button. You'll be prompted to save the exported model with a new name and the special ".locked.fsm" extension. After choosing a file name, FlexSim will save a copy of your model, but modify the copy to impose the specified restrictions. You'll see a confirmation message appear when the export operation completes.
Only the restrictions shown in this window are applied to the exported model. All other actions are allowed, unless otherwise restricted by their license. Users can see the 3D view, add objects, write new FlexScript code, etc. They can also change parameters, run the model, and/or run the Experimenter.
Restrictions
This section describes the restrictions you can impose on an exported model.
Disable Tree view
If you check the Disable Tree view box, the exported model will prohibit the user from opening any new Tree view windows. If a Tree view is open at the time you export your model, the Tree view in the exported model will not draw properly.
Set new password
If you check the
Hide all FlexScript
If you check the Hide all FlexScript box, then the exported model will change all nodes toggled as FlexScript. This includes all code in user commands, object triggers, and any activity field that uses FlexScript. The text for the FlexScript will be replaced with a simple identifier. That identifier will allow FlexSim to execute the code that was originally found on the node.
The end user will still be able to add new objects and define new FlexScript. However, they won't be able to see any of the original FlexScript
When you specify this option, you can also choose to Convert Process Flow fields to FlexScript. If you check this box, then the majority of Process Flow fields will be converted to FlexScript before the FlexScript is hidden. This includes all label names and values in the Assign Labels activity.
Disable Process Flow view
If you check the Disable Process Flow view box, the exported model will prohibit the user from opening any new Process Flow views. If a Process Flow view is open at the time you export your model, the Process Flow view in the exported model will not draw properly.
If you check this box, you can also choose to apply two additional options: Obfuscate Process Flow layout and Hide Process Flow activity names. The first option changes size and position of all activities. The second hides activity names and replaces them with unique identifiers.