Samples | C++ 6.8.4 C++ project commands and properties | C++ project commands and properties In addition to creating and opening projects, the TwinCAT Automation Interface can manage C++ projects programmatically. Project commands, such as starting the TMC code generator or publishing modules, are triggered on the project node via ConsumeXml() . To do this, an XML fragment is passed that describes the action to be performed. TwinCAT XAE processes the XML and executes the corresponding command. Using the same pattern, project properties can be read via ProduceXml() and written via ConsumeXml() .
Calling the TMC code generator The TMC code generator reads the .tmc file of a C++ project and uses it to generate or update the corresponding C++ class stubs. This step is required after every change to the TMC file to ensure that the generated C++ code matches the module description. Calling the code generator via the Automation Interface is equivalent to manually starting it using the Run TMC Code Generator context menu option on the project node in the IDE. The result is the same: The generated .cpp and .h files in the project are updated. C#: string startTmcCodeGenerator = @" true "; TE1000 284 Version: 1.7.0