Page 812 - ExtendSim User Guide
P. 812

Data Management and Exchange
Technologies for communication
Also, remember that programs expect only one delimiter (one tab, one space, or one comma) between columns. For example, don’t put in extra tab characters in order to make columns line up visually; if you do, the program is sure to get confused.
Changing text file font and size
Use the commands in the Text menu to temporarily improve the readability of a text file, for example, by increasing the size of the text. However, Text menu changes are discarded when you close the text file.
To permanently change the font or font size used when viewing text files, give the command Edit > Options > Model tab and use the Text file font option.
ActiveX/COM/OLE (Windows only)
ActiveX is Microsoft’s set of object-oriented programming technologies and tools. There are two main uses of the ActiveX technology in ExtendSim:
• ActiveX/OLE automation
• ActiveX/controls and embedded objects (COM)
ActiveX/OLE automation
ActiveX automation is the process of using ExtendSim’s OLE functions, or the scripting envi- ronment of another application, to communicate with, exchange data with, or control another application. This is, for example, the technology used by the Read and Write blocks to commu- nicate with Excel.
When you use the OLE functions inside ExtendSim to communicate with another application, ExtendSim is the Client in the automation communication and the other application is the server. When the other application is using its scripting environment to communicate with ExtendSim, ExtendSim is the Server.
When you develop custom blocks, automation is probably the most powerful tool that you can use for interapplication communication. It does, however, come with a cost. Developing code to use automation to control another application requires expertise with OLE/COM as well as knowledge of the object model of the target application.
An object model is essentially a list of the methods and objects that an application supports with regard to ActiveX automation. ExtendSim has a simple yet powerful object model that is described in some detail in the Developer Reference. Other applications have more or less complex object models. Excel, one of the more common target applications, has a quite com- plex object model; it is quite complex to deal with. The Object Mapper block (Custom Blocks library) is a tool that can be useful in learning more about the object model of an application or ActiveX control.
Automation is also the most common tool used to communicate with embedded objects or ActiveX controls when they are added to the ExtendSim application. The Bar Chart and Gantt Chart plotters (Plotter library) use ActiveX automation through ExtendSim OLE function calls to communicate and exchange data with the embedded objects.
ActiveX controls and embedded objects
The main ActiveX technology is COM (Component Object Model). COM is the framework for developing and supporting ActiveX controls and component objects.
☞ While the terms “component objects” and “ActiveX controls” are sometimes used interchange- ably, an object is often considered to have a source application that it derives from and a con-
How To

   810   811   812   813   814