TSM_E_INVALIDITEMSUBTYPE
Invalid Item SubType for Creation
Beckhoff · TwinCAT 2 Automation Interface
What does TSM_E_INVALIDITEMSUBTYPE mean?
The provided nSubType parameter for creating a child item is invalid or not compatible with the parent item's type (0x98510003). The usable subType depends on the parent tree item's category; for example, a PLC Functionblock may only be added to a PLCFOLDER item, not a DEVICE item.
Additional Steps
Steps 1–2 are listed in Priority Fix.
- 3
Review 'ITcSmTreeItem Item Types' (page 39) and 'ITcSmTreeItem Item Sub Types' (page 41) for valid combinations and dependencies.
Source: Beckhoff TwinCAT 2 Automation Interface
Open Manual (Page 62)