Prev: Notch filter
Next: How to cover part of a contour line
From: John on 30 Jun 2010 11:13 Does anyone know how I can open up the ports and data manager dialog for an embedded matlab block programatically?
From: John on 5 Jul 2010 12:53 "John " <ftfsxlbmnwn(a)mailinator.com> wrote in message <i0fmu3$ba5$1(a)fred.mathworks.com>... > Does anyone know how I can open up the ports and data manager dialog for an embedded matlab block programatically? Anybody have any idea about this?
From: Phil Goddard on 6 Jul 2010 01:02 I dug into the EML Editor UI a little, and unfortunately couldn't see what the exact callback is for opening the PADM. If I get some more time this week then I'll have another look. Are you assuming that the EML editor is already open? (It can be openned programatically quite easily.) Assuming that it must be before the PADM can be opened, one approach would be to use the Java Robot Class (search the newsgroup for examples of how to use it) to automatically click the editor buttons that open the PADM. Phil.
From: John on 6 Jul 2010 09:17 "Phil Goddard" <philNOSPAM(a)goddardconsulting.ca> wrote in message <i0udcc$3qo$1(a)fred.mathworks.com>... > I dug into the EML Editor UI a little, and unfortunately couldn't see what the exact callback is for opening the PADM. > If I get some more time this week then I'll have another look. > > Are you assuming that the EML editor is already open? > (It can be openned programatically quite easily.) > Assuming that it must be before the PADM can be opened, one approach would be to use the Java Robot Class (search the newsgroup for examples of how to use it) to automatically click the editor buttons that open the PADM. > > Phil. Thanks for the help Phil, No the EML editor will not be open so emulating button clicks will likely not work. I have been looking into the DAStudio methods, but haven't been able to figure it out how to open this dialog.
From: Phil Goddard on 7 Jul 2010 02:09
The actual UI is controlled by the function sf_de_manager.m which is in the directory MATLABROOT\toolbox\stateflow\stateflow\private. However you really need to call it via eml_man.m which is in the same directory. So ideally you want >> eml_man('edit_data_ports', sf('get', get_param(gcb,'UserData'), '.chart')) However, since the functions are in a private directory they cannot be called directly. One option would be to create a function handle like the following, >> currentDir = pwd; >> cd([matlabroot filesep 'toolbox\stateflow\stateflow\private']); >> fHandle = @eml_man; >> cd(currentDir); >> fHandle('edit_data_ports', sf('get', get_param(gcb,'UserData'), '.chart')) The above assumes that the block of interest had been selected and hence gcb refers to it. Phil |