Main Content

getHandleToBlock

Class: simevents.SimulationObserver
Namespace: simevents

Return block handle for a given block path

Syntax

getHandleToBlock(obj,blkPath)

Description

getHandleToBlock(obj,blkPath) is a utility function that returns the handle to the block whose full path is specified by blkPath.

Input Arguments

expand all

Object of class SimulationObserver

Full path to block.

Output Arguments

expand all

Handle to the block specified in blkPath.

Examples

expand all

Return handle to specified block.

function postEntry(obj,evSrc,evData)
   hdl=getHandleToBlock(obj,[this.mModel '/Have Dinner']);
   ...
end

Version History

Introduced in R2016a