Samples | C++ Sample The following sample shows how to create an empty module using TcModuleEmptyWizard . For other module types, you must use the corresponding wizard name from the table below. C#: string moduleTemplate = "TcModuleEmptyWizard"; // Create a new module in the C++ project using the specified module wizard ITcSmTreeItem cppModule = cppProject.CreateChild("NewModule", 1, "", moduleTemplate); PowerShell:
$moduleTemplate = "TcModuleEmptyWizard" # Create a new module in the C++ project using the specified module wizard $cppModule = $cppProject.CreateChild("NewModule", 1, "", $moduleTemplate) Module types The appropriate wizard is passed to CreateChild() as the fourth parameter, vInfo . The following table lists all available module types and their wizard names: TE1000 283 Version:
1.7.0 Module type Wizard name TwinCAT module class TcModuleEmptyWizard TwinCAT module class with ADS port TcModuleAdsPortWizard TwinCAT module class with cyclic caller TcModuleCyclicCallerWizard TwinCAT module class with cyclic I/O TcModuleCyclicIOWizard TwinCAT module class with data pointer TcModuleDataPointerWizard TwinCAT module class for RT context TcModuleRTWizard TwinCAT module class Online Changeable TcModuleOCWizard