Using OLE in SAS/AF Software under Windows |
A linked OLE object contains information about the object's server application and points to the data file that resides on disk, but does not contain data for the object itself. The object contains a static picture that represents the contents of the linked source.
Using the Links dialog box, you can specify to update a linked object:
automatically, whenever you update the source file that the object points to. (You must reload the FRAME entry before it reflects the change.)
manually, by choosing Update Now in the Links dialog box or by using the _UPDATE_ method in SCL.
manually, by pointing the object to a different source file using either the Links dialog box or the _UPDATE_ method in SCL.
Linked OLE objects that you include in a FRAME entry:
support open editing only (as opposed to visual editing, described in Editing an OLE Object within a FRAME Entry). When you double-click on the object's representation in the FRAME, the server application is invoked in a separate window with the object's data file open.
You can also update the data of a linked object by using the server application to open the data file the object points to.
must point to existing data files. If you change the location of a data file to which an object is linked, you must update the links information for the object.
Updating a Linked Object with the Links Dialog Box |
To update the links information with the Links dialog box (shown in Links Dialog Box):
Click on the object with the right mouse button. A pop-up menu appears, with the object type listed as the bottom menu item.
Click on the bottom menu item. A cascading menu containing valid OLE verbs for the object appears.
Click Links. The Links dialog box appears, containing link information for all of the linked objects in the FRAME entry. (If there are no linked objects in the FRAME, then the Links item is disabled.)
Use the Links dialog box to change information about the object as necessary. For example, if the data file resides in a different location, you can change the source for the object link.
An alternate way to open the Links dialog box for a linked OLE object is to use the DLGLINKS command from the command line. You can also use the _EXECUTE_ method in SCL to invoke the DLGLINKS command. For example:
call notify('linkobj','_execute_','dlglinks');
Updating a Linked Object Programmatically |
To change the source of a linked object programmatically with SCL, use the _UPDATE_ method to specify a new HSERVICE entry to associate with the object. The _UPDATE_ method for OLE objects accepts the name of an HSERVICE entry as a third argument. (This method overrides the Widget class _UPDATE_ method.) For the syntax of the OLE _UPDATE_ method, see _UPDATE_.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.