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
The main tree items that exists in every configuration file can be accessed via shortcuts. These shortcuts are language neutral and require less memory:
"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 |