How to add a callback function to mouse-click event inside a Simulink model but outside any block or line?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Bhisma Adhikari
am 15 Aug. 2020
Beantwortet: Bhisma Adhikari
am 19 Aug. 2020
HI, I am creating a plugin tool for Simulink to help users during model development. When creating their Simulink model in Simulink workspace/window, whenever the user clicks somewhere inside the simulink workspace (but outside any block or line), I need to execute a callback function. How do I do this?
PS. I was able to add callback functions to blocks (by temporarily overriding their 'openfcn' function). I need something simillar so that I can execute a callback function when the user clicks outside of any block, but still inside the simulink workspace.
I NEED TO CALL THE CALLBACK FUNCTION WHEN CREATING THE SIMULINK MODEL, NOT WHILE RUNNING A SIMULATION.
Thank you!
3 Kommentare
stozaki
am 19 Aug. 2020
Hello Bhisma,
If you use a left click on the Simulink canvas, the Quick Block Insert function will work.
The following is a workaround, but using the annotation's click function seems to work. Can you apply this?
I attached a simple model.
Regards,
stozaki
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!