Importing OLE Objects

SuperPro Designer not only makes it easy to share drawings and data with other programs, but also allows you to import foreign documents (such as MS-Word® files or bitmaps) or document fragments (portions of a MS-Excel® book) and make them part of your process file. Using Windows®’ OLE (Object Linking and Embedding) technology, you can import an object copied into the clipboard from another OLE-server application (e.g., MS-Excel®, Corel Draw®, MS-Word®, etc.). For instance, let us assume that you have been working on some side calculations with MS-Excel® (related with a particular aspect of your process) and you would like to display them on your process flowsheet. You can copy and paste (or even better, paste-link) that portion of your book right into your process flowsheet. Here’s how:

►    To Import an OLE object into the process flowsheet...

2.   Copy the original item
Go to the application that created the OLE object, (e.g. MS Excel®) and copy the object (spreadsheet area) that you wish to display in the process flowsheet. Typically, selecting the object and then File } Copy from the main menu (or Ctrl+C) would do it.

1.   Click on an empty area of your flowsheet
Before importing the object, you need to indicate to the program, where you wish to have the object pasted. You can do that by simply clicking on an unoccupied area of your process flowsheet. Make sure that you do not click over another element of your flowsheet, and that there is enough unoccupied space around the location to accommodate the size of your imported item. The application will place the imported item centered around the location of your last click.

3.   Paste the object
If you select File } Copy or (Ctrl+C) the application will paste a copy of your OLE object into the flowsheet. If you select File } Copy Special, then the dialog shown in The ‘Paste Special’ dialog. will be shown. From that dialog you can either opt to:
(a) Paste, or
(b) Paste-Link
the object. Paste-linking the object, establishes a hot-link between the original object (e.g. spreadsheet) and the displayed grid on your process flowsheet. Whenever the related content changes, then the displayed information on your flowsheet will change too. If you chose to simply paste the object, then a frozen image of the object (as it exists now) will be pasted in your flowsheet and it will never be updated (even if the original object is modified).

PasteSpecialExcelDlg.jpg

 

The ‘Paste Special’ dialog.

You can also initiate the creation of a new OLE object straight from your process flowsheet. In other words, you don’t have to ever leave SuperPro Designer to initiate the creation of another object and have it pasted right there.

►    To insert a new OLE object in the process flowsheet...

Select Edit } Insert Object
Notice how the cursor changes to: AddOLECursor.jpg

Click on an unoccupied area of your flowsheet
Before creating the object, you need to indicate to the program, where you wish to have the object pasted. You can do that by simply clicking somewhere in your flowsheet. Make sure that you do not click over another element of your flowsheet, and that there is enough unoccupied space around the location to accommodate the size of your imported item. The application will place the imported item centered around the location of your last click.

Select object type
A dialog similar to what is shown in The ‘Insert Object’ dialog. will appear. Select the object type that you wish to create (spreadsheet, equation, etc.). The list of objects presented depends on the OLE servers registered in your Windows® environment.

InsertObjectDlg.jpg

 

The ‘Insert Object’ dialog.

Click OK. Notice that the menus of the application have changed. They have been replaced by the menus of the server application that will selected in the ‘Insert Object’ dialog.

IconInfo00010.bmp 

When a saved process (.spf) file that contains foreign OLE objects is opened in SuperPro Designer, the application will attempt to connect to each of the objects’ server applications in order to properly display them. Therefore it is important that the next time you (or any of your colleagues that may be viewing this file) open it, you must have a compatible version of the server applications that created those objects. If you don’t, an error message will be displayed during the opening of the file. If you intend to send the process file to a colleague that you know doesn’t have access to embedded OLE objects in your file, you may save a version of your file without the objects (select File } Save in a File without OLE Objects from the main menu) and send him that file.