0

I have a requirement to call an m script when the build button is clicked after selecting a target in real time workshop. Can anyone suggest, how this can be accomplished ? Also I have to pass the name of the simulink model in this m script. Is there a function to extract the name of the current simulink model?

Thanks for your help in advance.

Be_bro
  • 15
  • 1
  • 5
  • Would PostCodegenCommand (http://www.mathworks.com/help/rtw/ug/customizing-post-code-generation-build-processing.html) or RTW hooks (http://www.mathworks.com/help/rtw/ug/customizing-the-target-build-process-with-the-stf-make-rtw-hook-file.html) work for you? – Navan Dec 09 '14 at 14:30
  • Hi, Thanks very much i was able to add some m scripts in the rtw_hook files. – Be_bro Dec 11 '14 at 15:02

2 Answers2

2

This is typically achieved using RTW Hooks. To see a description of the process select the first link that appears after executing the following:

docsearch('Customize Build Process with STF_make_rtw_hook File')

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
0

Use bdroot or gcs to get the name of the Simulink model. Not sure about calling a MATLAB script as part of the build.

am304
  • 13,758
  • 2
  • 22
  • 40