Packaging module files into ZIP archives

Callbacks can be used to store generated module files in as a ZIP archive, for example. First create the directory C:\MyGeneratedTcComModules, then copy the following command in the PostPublish callback field of the code generator settings of the Simulink model under Tc Build:

zip(fullfile('C:\MyGeneratedTcComModules',cgStruct.ModuleName),'*',fullfile(getenv('TwinCat3Dir'),'CustomConfig','Modules',cgStruct.ModuleName))
Packaging module files into ZIP archives 1: