The ActiveX write block links source information in block diagram to another application. The destination application must be an ActiveX container.
To create an ActiveX link to write data to an ActiveX container
1. Start Embed and open the appropriate diagram.
2. Click Blocks > Real Time > ActiveX write.
3. Click the mouse where you want the ActiveX write block to be inserted.
4. Right-click the ActiveX write block.
5. Do the following in the ActiveX write dialog:
a. In Name, click the DOWN ARROW to select from a list of ActiveX controls, or type in a new one.
b. The Value box is read-only. It indicates a value for the signal. Typically, the value is set dynamically by the application.
c. Click OK, or press ENTER.
6. Switch to the destination application and open the file in which you want to create a link.
7. Insert the Embed ActiveX control or OLE object.
8. Right-click ::IPC var and select IPC Control > Properties.
9. In the IPC Control Properties dialog, do the following:
a. In Name, enter the name of the ActiveX control that corresponds to the ActiveX control name in Embed (see step 6).
b. In Value, do not type anything. Typically, the value is set dynamically using Microsoft Visual Basic.
c. Click OK, or press ENTER.
10. To manipulate the data:
a. Start Microsoft Visual Basic. In many applications, you can start Visual Basic from the application. For example, in Microsoft Excel, click Tools > Macro > Visual Basic Editor.
b. Write the appropriate subroutine to manipulate data that is written into the ActiveX container. For information on writing subroutines, see the Microsoft Visual Basic documentation, go to the Object Browser for a list of available functions, and see Embed-specific functions.
11. Return to Embed and run the simulation.