API Comments The ITcSysManager interface contains two methods used for navigating within TwinCAT XAE: ITcSysManager::LookupTreeItem [ } 35] and ITcSysManager3::LookupTreeItemById [ } 36] . A detailed explanation of browsing TwinCAT XAE can be found in the chapter TreeItem Browsing Models [ } 18] . NOTE The three methods ITcSysManager::NewConfiguration [ } 31] , ITcSysManager::OpenConfiguration [ } 32] and ITcsSysManager::SaveConfiguration [ } 32] are only available in Compatiblity Mode [ } 17] . Calling them in standard mode will throw an E_NOTSUPPORTED Exception. The ITcSysmanager and the ITcSmTreeItem [ } 37] interface allows full access to a TwinCAT configuration. In the How to...
section of this documentation there is a long (but incomplete) list of samples how to manipulate a TwinCAT configuration automatically. Version information Required TwinCAT version This interface is supported in TwinCAT 2.11 and above 6.1.1 ITcSysManager::NewConfiguration The NewConfiguration() method generates a new TwinCAT configuration file. HRESULT NewConfiguration(); Return Values Comments NOTE The three methods ITcSysManager::NewConfiguration [ } 31] , ITcSysManager::OpenConfiguration [ } 32] and ITcsSysManager::SaveConfiguration [ } 32] are only available in Compatiblity Mode [ } 17] . Calling them in standard mode will throw an E_NOTSUPPORTED Exception.
Automation Interface 31 Version: 1.2 ITcSysManager2 methods Description Available since GetTargetNetId [} 34] Gets the target NetId of the currently opened TwinCAT configuration. TwinCAT 2.11 GetLastErrorMessages Get the last error messages which occurred in the TwinCAT subsystem. TwinCAT 2.11 ITcSysManager3 methods Description Available since LookupTreeItemById Looks for a configuration tree item with the specifed Item id. TwinCAT 2.11 ProduceMappingInfo Produces a Xml-Description of the actual configuration mappings. TwinCAT 3.1 ClearMappingInfo Clears the mapping info. TwinCAT 2.11 S OK _ the function returns successfully.
E ACCESSDENIED _ the current document in the system manager instance is locked. This occurs if at least one reference to the system managers object or one of the tree elements are open. E FAIL _ the function fails.