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
Version | Newly introduced |
|---|---|
Basic interface: name, type, path, parent/child relationships, variables, XML serialization, child operations. | |
Changing SubTypes and selecting resources. | |
ITcSmTreeItem4 | Internal Visual Studio integration data. |
Language-independent name. | |
User files: signature, encryption, Object Protection Level. | |
Collection access to child nodes, reference back to the owning System Manager. | |
Access to the Visual Studio | |
Flags for project variants (Define, Disable, Link, Parameter, SParameter). | |
Support for project variants in simulation states. |