API | ITcSmTreeItem 5.1.17.1 ITcSysManager18::SelectTreeItem | ITcSysManager18::SelectTreeItem Selects and highlights the specified Tree Item in the System Manager view. Useful for tooling that wants to direct the IDE's focus to a specific item. Signature HRESULT SelectTreeItem(BSTR bstrItem); Parameter Return value Error codes TSM_E_ITEMNOTFOUND : Path could not be resolved. E_ACCESSDENIED : System Manager is disabled. See also ITcSysManager::LookupTreeItem 5.2 ITcSmTreeItem | ITcSmTreeItem ITcSmTreeItem is the central interface for nodes in the TwinCAT project tree, such as devices, boxes, variables, containers, and project objects.
It provides access to the name, type, path, parent/child relationships, variables, XML serialization, and basic child operations. The versions ITcSmTreeItem2 through ITcSmTreeItem10 extend this root interface to include resource selection, Visual Studio integration, custom files, collections, and project variants. When writing new code, you should use the highest available interface version. Chain of inheritance ITcSmTreeItem └── ITcSmTreeItem2 └── ITcSmTreeItem4 └── ITcSmTreeItem5 └── ITcSmTreeItem6 └── ITcSmTreeItem7 └── ITcSmTreeItem8 └── ITcSmTreeItem9 └── ITcSmTreeItem10 For items that have already been deleted, the methods return TSM_E_ITEMDELETED .
Write operations are protected against non-editable files. Domain-specific behavior, such as CreateChild or DeleteChild , depends on the specific node type. Interface versions TE1000 55 Version: 1.7.0 Name Type Description bstrItem BSTR [in] Path name of the Tree Item. Name Type Description (HRESULT) HRESULT S OK if successful, otherwise an error code. _ Version Newly introduced ITcSmTreeItem [} 56] Basic interface: name, type, path, parent/child relationships, variables, XML serialization, child operations. ITcSmTreeItem2 [} 61] Changing SubTypes and selecting resources. ITcSmTreeItem4 Internal Visual Studio integration data.