bdeGetBlockScopesHandles

Get the handle of all the scopes in a certain block.

Syntax

h = bdeGetBlockScopesHandles(block)

Inputs

block
Block to get the handles from.
Type: block

Outputs

h
Scope handle(s) of the block.
Type: double

Example

Get handles of scopes within a block.

me=fileparts(omlfilename('fullpath'));
fname=[me,'/ModelName.scm'];
mdl=bdeLoadModel(fname);
vssRunSimulation(mdl);

h1=bdeGetScopeHandle(mdl,'Scope')
h2=bdeGetScopeHandle(mdl,'SuperBlock/Scope')
h3=bdeGetScopeHandle(mdl,'SuperBlock/SuperBlock/Scope')

blk=bdeGetBlockByFullName(mdl,'Scope');
h4=bdeGetBlockScopeHandle(blk)

blk=bdeGetBlockByFullName(mdl,'SuperBlock');
try
	h5=bdeGetBlockScopeHandle(blk)
catch
	msg=lasterr;
	disp(['Error:',msg])
end

h6=bdeGetBlockScopeHandle(blk,'Scope')
h7=bdeGetBlockScopeHandle(blk,'SuperBlock/Scope')

h8=bdeGetBlockScopesHandles(blk)

bdeCloseModel(mdl);