.. _example_generation: Example Generation ================== The RTI Code Generator available with |me| can generate DDS example applications with a type definition file as input. Note that before running *rtiddsgen*, you might need to add <|me| install folder>/rtiddsgen/scripts to your path environment variable folder. To generate an example:: rtiddsgen -example -language [-namespace] This command generates an example using the default example template, which uses the Dynamic Participant Dynamic Endpoint (DPDE) discovery plugin. *rtiddsgen* accepts the following options: - ``-example``: Generates type files, example files, and CMakelists files. - ``-language ``: Generates C or C++ code. - ``-namespace``: Enables C++ namespaces when the language option is C++. The generated example can be compiled using CMake _ and the CMakelists.txt file generated by the RTI Code Generator. A README.txt file is also generated with a description of the example and instructions for how to compile and run the examples. The RTI Code Generator can also generate examples using custom templates by using the option ``-exampleTemplate ``. To generate an example using a custom template instead of the default one:: rtiddsgen -example -exampleTemplate