Main Content

getHandleToBlock

Class: simevents.SimulationObserver
Package: 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

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
Introduced in R2016a