The ItemListBuilder Windows application creates XML files with item definition lists. OPCDA.NET contains the ItemListLoader helper class that loads the items defined in a list into an OPCItemDef array that can be used in the AddItems server call.
The ItemListBuilder and the ItemListLoader class are only available in the OPCDA.NET Professional Edition.
Some OPC client applications work with a specific server and a predefined set of items. The development of such applications can be simplified. Instead of coding the item names into the application, the items can be browsed and selected into an XML file. The client application loads the item definition array from the XML file. The XML file can be a separate file or it can be embedded in the client application.
![]() |
Usage:
A local or remote OPC server is browsed and it's items are displayed in a TreeView.
The ItemListBuilder creates XML files that contain one or multiple item definition lists.
A new XML file is created by:
- Type List name and select the list defaults. The list defaults can be disabled by un-checking the checkboxes.
- click the ADD button in the Item List tab. The list name is displayed in the Definition Set TreeView.
- Select an item in the browse TreeView. The item name is displayed in the Item Definition tab.
- Change the item data if required. ( See explanations below )
- In the Definition Set TreeView select the list to which the item is to be added.
- Click the ADD button in the Item Definition tab. The item name is displayed in the Definition Set TreeView as a member of the selected list.
An existing XML file can be loaded and modified.
- Click the Load button and select the file.
- Select the item in the Definition Set TreeView.
- Make changes and click the change button.
- Click Save or Save As to create a new file.
Client Handles
The client handle is typically used in data change callbacks to associate values with their item. The server returns the client handle defined in the AddItems call in callbacks and the client can define the client handle as it best suites the client application.
The client handle can be specified:
- in the XML file
- created in the ItemListLoader method GetItemList
The user can either define a client handle value individually for each item or create sequential client handle values for all items defined in the selected list by clicking the Create Sequential Handles button. The client handle of the first item in the list is read and left unchanged. The following items are assigned increasing client handle values.