No BSD License  

Get Current Stateflow Object - gcsfo


Sven Probst (view profile)


06 Jan 2005 (Updated )

The function gcsfo returns all current (=selected) graphical stateflow objects.

function curObj=gcsfo()
%GCSFO get current (selected) stateflow objects
% This function returns all stateflow objects of the actual simulink
% model (-> bdroot) being selected

% find stateflow machine of actual simulink model (-> bdroot)
m = rt.find('-isa', 'Stateflow.Machine', '-and','Name',bdroot);

% find stateflow chart handle
visChart = m(1).find('Visible',1);

% Editor object of the current
editor = visChart.Editor;

curObj = editor.selectedObjects;

Contact us