Samples | PLC TwinCAT Build 4026.7 or later. Setting the documentation format The following command sets the format to TcDocGen. An empty tag resets the format to its default value. ITcSmTreeItem plcProject = sysManager.LookupTreeItem(@"TIPC^PLC1^PLC1 Project"); // Set TcDocGen documentation format plcProject.ConsumeXml(@" TcDocGen "); // Reset to default (empty string sets format to "Default") plcProject.ConsumeXml(@" "); Valid values 6.5.11 Exporting PLC library signatures | Exporting PLC library signatures ITcPlcLibraryManager2 allows you to export the type signatures of all referenced libraries in a PLC project as XML.
The ProduceAllLibrarySignatures() method returns a structured description of the public types in each referenced library, including function blocks, global variables, and data types. The result is an XML string that can be saved directly or processed further.
Requirements A PLC project is available C# sample ITcSmTreeItem plcProject = sysManager.LookupTreeItem(@"TIPC^PLC1^PLC1 Project^References"); ITcPlcLibraryManager2 libManager = (ITcPlcLibraryManager2)plcProject; // Export signatures of all referenced libraries string allSignaturesXml = libManager.ProduceAllLibrarySignatures(); System.IO.File.WriteAllText(@"C:\Export\LibSignatures.xml", allSignaturesXml); PowerShell sample $plcProject = $sysManager.LookupTreeItem("TIPC^PLC1^PLC1 Project") # Export all library signatures (late binding) $xml = $plcProject.ProduceAllLibrarySignatures() $xml | Out-File "C:\Export\LibSignatures.xml" -Encoding UTF8 TE1000 237 Version:
1.7.0 Value Meaning TcDocGen TcDocGen documentation generator "" (empty) Resets the format to “default”