Simulink.ID.getHandle

Get handle of block, annotation, or Stateflow object

Description

example

hdl = Simulink.ID.getHandle(simulinkID) returns the handle of the block, annotation, or Stateflow object that has the Simulink Identifier simulinkID.

Examples

collapse all

Open the model vdp.

vdp

Get the SID of the Sum block.

Simulink.ID.getSID('vdp/Sum')
ans =

'vdp:8'

Get the handle of the Sum block using the SID.

hdl = Simulink.ID.getHandle('vdp:8')

Input Arguments

collapse all

Simulink Identifier of a block, annotation, or Stateflow object, specified as a character vector or string scalar.

Example: 'vdp:4'

Output Arguments

collapse all

Handle of a block, annotation, or Stateflow object, returned as a double or a Stateflow object handle.

Introduced in R2009b