MATLAB: How to get a SimStruct * from a block path

cMATLABsimulink

I'm working on a Simulink block library using C++ s-functions as the back end of the blocks, and I'm currently trying to return more meaningful error messages with the blocks they refer to highlighted. Given a block path, is there any way to obtain or spoof the SimStruct object when calling ssSetErrorStatus so that the block the path refers to is highlighted? Thanks.

Best Answer

I don't this it is possible get the SimStruct* based on the block path. However, if you specify the block path in the error message, Simulink should automatically convert it to a hyperlink that the user can click on to easily navigate to the corresponding block.