As you develop a Mathcad worksheet, you may want to embellish it or extend its functionality by inserting objects, which are elements you create in another application such as a word processor or a drawing package. Conversely, you may want to insert Mathcad worksheets or regions from a Mathcad worksheet into another application. OLE (Object Linking and Embedding) technology in Microsoft Windows.makes it possible not only to insert static pictures of such objects into your applications (or of Using OLE 91 Mathcad objects into other applications), but to insert the objects in such a way that they can be fully edited in their originating applications. You insert objects into Mathcad, which is an OLE2-compatible application, by using the Object command from the Insert menu, by drag-and-drop, or by copying and pasting. Each of these methods is explained in detail in this section. The method you
choose depends on whether you want to create the object on the fly, whether the object has already been created, or whether you want the object to be an entire file. You can edit objects in a Mathcad worksheet simply by double-clicking on them, causing inplace activation of the originating application in most cases. In general, you can also use these methods to insert Mathcad objects into other applications and edit them inside those applications. However, the details depend on the extent to which the application receiving a Mathcad object supports OLE2. This section, therefore, focuses on inserting objects into Mathcad and only briefly touches
on inserting Mathcad objects into other OLE2-compatible applications. For information about using Mathcad’s components for importing and exporting data, as well as establishing dynamic connections with other applications, see Chapter 19, “Data Management.” If you would like to import or export graphic files such as bitmaps into your Mathcad worksheets, turn to Chapter 28, “Importing and Exporting Graphics.”
Embedded vs. linked objects
Objects can be either embedded in or linked to a Mathcad worksheet. For you to link an otiject, the object must exist in a saved file. An object that you embed, on the other hand, may be created at the time of insertion or it may be part of a saved file. The difference between an embedded object and a linked object is only important when you want to edit it. When you edit an embedded object, any changes you make to the object will affect it only in the context of the Mathcad worksheet. The original object in the source application, if there is one, is left undisturbed. When you edit a linked object, on the other hand, any changes you make to the object will affect the actual file containing the object.
Inserting an object into a worksheet
One way to insert an object from another application into Mathcad is to use the.Object command from the Insert menu. Using this method, you can insert an object that you create on the fly at the time you are inserting it, or you can insert an entire file that you’ve already created. To insert an object or a saved file, you should first:
• Click in a blank area of your worksheet where you would like to insert the object. Make sure that you see the crosshair.
• Choose Object from the Insert menu to bring up the Insert Object dialog box. By default the “Create New” radio button is selected:
• Click the “Display as Icon” checkbox if you want an icon, rather than the actual object, to appear in your worksheet. The icon is typically the icon of the application that created the object. Then, to create a new object:
• Select an application from the “Object Type” list in which to create the object. The available object types will depend on the applications you have installed on your system.
• Click “OK.” The source application opens so that you can create the object. When you are finished working to create the object, close the source application. The object you created will be embedded in your Mathcad worksheet. If you want to insert a previously created file:
• Click the “Create from File” radio button in the Insert Object dialog box. The dialog box will then look like this
• Type the path to the object file or use the “Browse” button to locate it.
• Click the “Link” checkbox to insert a linked object. Otherwise, the object will be embedded.
• Click “OK.”The object will then be either linked or embedded in your Mathcad worksheet.