www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@mdevtestplan/SetupModel.m

    function OK = SetupModel(mdev)
% MDEVTESTPLAN/SETUPMODEL

%  Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.



mbH=MBrowser;
p=mbH.CurrentNode;
View=mbH.GetViewData(p.guid);
OK=1;

T= p.info;

NStages= length(T.DesignDev);
Stage= find(strcmp(get(View.hHSM.hBorder,'Selected'),'on'));
if NStages==1 & isempty(Stage)
   Stage= find(strcmp(get(View.hHSM.pBorder,'Selected'),'on'));
   if  Stage>NStages
      Stage= NStages;
   end
end
if ~isempty(Stage) 
   fcall= get(View.hHSM.Menu(1),'Callback');
   feval(fcall,[],[],Stage);
end