OLE Automation
Appendix F Obsolete Features
317
'The '[ ]' or '.' format can be used to delimit
the array index
Cells(3,1) = DDERequest(chan, "Array2[2]")
Cells(3,2) = DDERequest(chan, "Array2.3")
End If
End Sub
F.5 OLE Automation
OLE Automation provides a mechanism whereby one application can control
another. In order to access a CX-Supervisor points value via OLE Automation,
it must be given either OLE Read or OLE Write access. This can be achieved
by checking the appropriate box in the Advanced Point Settings dialog box
when the point is created or modified.
CX-Supervisor exposes the following Runtime functions via OLE2 Automation:
•
SetValue(stringPointName,Value). Enables any point with OLE Read/
Write access to be modified (value may be Boolean, integer, long or
string).
•
GetValue(stringPointName,&Value). Enables any point with OLE Read
access to be monitored (value may be Boolean, integer, long or string).
•
QueryCount(). Returns the total number of points in the CX-Supervisor
database.
•
QueryId(stringPointName), Returns the WORD id of a given point name.
The id is an integer in the range between 1 and the total number of points
in the CX-Supervisor database.
•
QueryOLE(wordID). Returns the Read/Write access rights of a point as an
integer. 0 represents no access type; 1 represents Read Only; 2
represents Read/Write; 3 represents an invalid access type.
•
QueryType(wordID). Returns the points data type as an integer from a
given id. 0 represents a void datatype; 1 represents a digital datatype; 2
represents an integer datatype; 3 represents a real datatype; 4 represents
a text datatype; 5 represents an invalid datatype.
•
QueryName(wordID). Returns the points name string from a given
identity. CX-Supervisor provides OLE Automation helper routines and
code examples in the OLE2AUTO subdirectory. Refer to the file
OLE2AUTO.WRI in that subdirectory for more information.
F.6 OLE Overview
The Microsoft Windows operating environment allows the transfer and sharing
of information between applications by using a technique known as Object
Linking & Embedding, or OLE (pronounced olé). Embedding allows drawings,
sounds or almost any objects to be created within an application, and then
inserted (embedded or linked) within another file or document. The embedded
object can then be edited (or activated) by merely double clicking on it. Linking
allows an object to be shared by several documents by forging links between
the destination documents and the source object, e.g. a company logo may
appear in several word processor documents by linking to a graphics object
rather than embedding.
Embedding and Linking Objects within the CX-Supervisor application can
either be achieved by using the Object Packager, or by embedding or linking
objects directly within a page.
Note:
All CX-Supervisor System points are given OLE2 read access by default.
Содержание CX-Supervisor
Страница 1: ...CX Supervisor Software Cat No W10E EN 01 User Manual Software Release 3 1...
Страница 3: ...Copyright Notice 2...
Страница 16: ...15...
Страница 17: ...16...
Страница 27: ...Tip of the Day SECTION 1 Graphics Editor 26...
Страница 35: ...CX Supervisor Preferences SECTION 2 Pages 34...
Страница 79: ...Responding to Events SECTION 5 ActiveX Objects 78...
Страница 115: ...Printing the Graphics Library SECTION 7 Graphics Library 114...
Страница 181: ...Data Logging SECTION 11 Data Logging 180...
Страница 201: ...Examples SECTION 12 Databases 200...
Страница 243: ...Performance Monitor SECTION 16 Application Analysis Performance Monitor 242...
Страница 253: ...Using with Omron s CX Server OPC SECTION 17 Using CX Supervisor as an OPC Cli 252...
Страница 259: ...Creating a CX Supervisor Client application SECTION 18 Connecting to a remote CX 258...
Страница 263: ...Adding a Point Linked to a Parameter SECTION 19 Connecting to Omron Industrial 262...
Страница 271: ...Data Logging SECTION 20 Best Practices 270...
Страница 275: ...Configuring a Server PC running Windows NT or 2000 Appendix A Configuring a PC 274...
Страница 277: ...Appendix B Frequently Asked Questions 276...
Страница 296: ...Appendix B Frequently Asked Questions 295...
Страница 297: ...Appendix B Frequently Asked Questions 296...
Страница 298: ...Appendix B Frequently Asked Questions 297...
Страница 299: ...Appendix B Frequently Asked Questions 298...
Страница 333: ...Revision history 332...