Main Content

slreportgen.finder.DiagramElementResult class

Package: slreportgen.finder

Create diagram element finder result object


Diagram element search result object for an element in a Simulink® or Stateflow® diagram.


result = DiagramElementResult(elem) creates a search result object for a diagram element. The result object contains the specified Simulink or Stateflow diagram element.


The find methods of diagram element finders create and return instances of this slreportgen.finder.DiagramElementResult object. You do not need to create instances yourself.

finder = DiagramElementResult(Name,Value) sets properties using name-value pairs. You can specify multiple name-value pair arguments in any order. Enclose each property name in single quotes.

Input Arguments

expand all

Simulink or Stateflow diagram element, specified as a path or handle to the element.


expand all

This read-only property contains a handle to the diagram element returned in this result.

This read-only property specifies the name of the diagram element returned in this result.

This read-only property specifies the type of the diagram element returned in this result.

Example: "Simulink.BlockDiagram"

This read-only property returns the path of the diagram that contains the element returned in this result.

Additional information to add to this result. You can set it to any type of value.


getDiagramReporterReturns Diagram reporter for diagram element result
getReporter Get diagram element reporter

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.


Create Diagram Element Result Object for Subsystem

Load the sf_car model and save the result of searching for diagram elements in its Engine subsystem. Both code examples produce the same result object. Use the second approach if you want to customize how the results display in your report.

import slreportgen.finder.*
result = DiagramElementResult('sf_car/Engine') 

% or

finder = DiagramElementFinder();
result = find(finder,'sf_car/Engine')
Include the result directly in an report or, add it to a reporter that you then add to the report.

Introduced in R2017b