API Return Values 6.1.10 ITcSysManager2::SetTargetNetId The SetTargetNetId() method sets the NetId of the current TwinCAT system. HRESULT SetTargetNetId(STRING netId); Parameters Return Values 6.1.11 ITcSysManager2::GetLastErrorMessages The GetLastErrorMessages() metod returns the last error messages. HRESULT GetLastErrorMessages(); Parameters None Return Values 6.1.12 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 Return Values Shortcuts Shortcuts Automation Interface 35 Version: 1.2 STRING returns target's NetId.
netId represents the target's NetId. S OK _ function returns successfully. STRING Returns last error messages. 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 [} 37] interface pointer on return. The interface pointer gives access to specific methods belonging to the tree item. S OK _ function returns successfully. TSM E ITEMNOTFOUND _ _ (0x98510001) the path name does not qualify an existing tree item.