Page 617 - ExtendSim User Guide
P. 617

Creating a Custom User Interface 591
Interacting with the model user
The equation in the following screen shot causes a message to appear to the model user, asking for a new processing time if the length of the queue exceeds 50 and at least 10 time units have elapsed since the last value was requested.
☞ For more about using equation blocks, see “Equation-based blocks” on page 695.
Additional interactive features if you program
If you develop your own libraries of blocks or want to modify existing blocks, ExtendSim pro- vides even more capability for delivering messages and interacting with users. Here are some ideas from the ExtendSim Developer Reference:
• Changewhatisshowninadialogdependingonwhatoccursinthemodelorwhattheuser selects or enters in the dialog. For example, you can change the text that is displayed in a block’s dialog depending on which button a user clicks.
• Someoftheavailablefunctionsincludedisplayingamessage,promptingtheusertoinputa value, or making a sound. These functions can also be used for debugging ExtendSim’s ModL code, although using the Source Code Debugger is the preferred approach.
• DLLs (Windows) and Shared Libraries (Mac OS) are especially handy where you want to add a feature or functionality that ExtendSim’s language (ModL) does not support. For example, you could use a DLL or Shared Library to display a picture or graphic in a separate window when a user clicks a button or to create a customized sound resource based on numerical values from the model. DLLs and Shared Libraries are segments of code written in any language, such as Visual Basic or C++. ExtendSim’s DLL and Shared Library func- tions allow you to call these code segment resources from within a block’s ModL code and perform operations.
• Embeddedobjectscanbeusedtoplaceadocumentordisplayfromanotherapplication,such as Excel, into an ExtendSim model. Use one of the methods discussed at “Embedding an
How To

   615   616   617   618   619