TSM_E_INVALIDITEMTYPE

Invalid Tree Item Type for Operation

Beckhoff · TwinCAT 2 Automation Interface

What does TSM_E_INVALIDITEMTYPE mean?

One or both of the specified tree items are not valid for the attempted operation (0x98510002). For LinkVariables() or UnlinkVariables(), this means one or both tree items are not of a variable type, preventing linkage operations.

Additional Steps

Steps 1–2 are listed in Priority Fix.

  1. 3

    Adjust the automation script to target correct variable paths for linking or unlinking.

Source: Beckhoff TwinCAT 2 Automation Interface
Open Manual (Page 34)