ITcSysManager::LookupTreeItem
The LookupTreeItem() method returns a ITcTreeItem pointer of a tree item given by it's full path name.
HRESULT LookupTreeItem(BSTRbstrItem, ITcSmTreeItem**pipItem);
Parameters
bstrItem | [in] path name of the tree item looking for. The full path name is required and each branch must be separated by a circumflex accent '^' or a tab. A list of shortcuts for the main tree items is listed below. |
pipItem | [out, retval] points to the location of a ITcSmTreeItem interface pointer on return. The interface pointer gives access to specific methods belonging to the tree item. |
Return Values
S_OK | function returns successfully. |
TSM_E_ITEMNOTFOUND (0x98510001) | the path name does not qualify an existing tree item. |
Shortcuts
Shortcuts
The main tree items that exist in every configuration file can be accessed via shortcuts. These shortcuts are language neutral and require less memory:
Shortcut | Description |
---|---|
"TIIC" | Shortcut for "I/O Configuration" |
"TIID" | Shortcut for "I/O Configuration^I/O Devices" or "I/O Configuration" TAB "I/O Devices" |
"TIRC" | Shortcut for "Real-Time Configuration" |
"TIRR" | Shortcut for "Real-Time Configuration^Route Settings" |
"TIRT" | Shortcut for "Real-Time Configuration^Additional Tasks" or "Real-Time Configuration" TAB "Additional Tasks" |
"TIRS" | Shortcut for "Real-Time Configuration^Real-Time Settings" or "Real-Time Configuration" TAB "Real-Time Settings" |
"TIPC" | Shortcut for "PLC Configuration" |
"TINC" | Shortcut for "NC Configuration" |
"TICC" | Shortcut for "CNC Configuration" |
"TIAC" | Shortcut for "CAM Configuration" |
Sample (C++):
ITcSmTreeItem* ipItem;
BSTR bstrItem = L"TIID^Device 1 (C1220)";
if ( SUCCEEDED(spTsm->LookupTreeItem( bstrItem, &ipItem )))
{
// do anything with ipItem
ipItem->Release();
}
Sample (VB):
Dim ipItem As ITcSmTreeItem
Set ipItem = spTsm.LookupTreeItem("TIID^Device 1 (C1220)")
' do anything with ipItem