Working with callbacks

There are three different callback functions:

Enter the name of your created MATLAB® function here to call it.

Working with callbacks 1:

Your MATLAB® function is passed the ProjectExporter object as a transfer parameter:

function MyCallback(obj)

return

The object contains the current configuration of the build in its properties.

ProjectExporter with properties:
ProjectGenerator: [1×1 TwinCAT.ModuleGenerator.ProjectGenerator]
Configuration: [1×1 TwinCAT.ModuleGenerator.ProjectExportConfig]
Project: [1×1 TwinCAT.ModuleGenerator.Project]
State: [1×1 struct]
ClassExporters: {[1×1 TwinCAT.ModuleGenerator.Simulink.ModelExporter]}
AdditionalExports: [1×1 containers.Map]
Working with callbacks 2:

Sample code in MATLAB®

Open the appropriate sample with: TwinCAT.ModuleGenerator.Samples.Start('Callbacks')