Main Content


Get property values of finder result object and the diagram element object represented by result object

Since R2022a



    propVals = getPropertyValues(resultObject,propNames) returns the values of the properties specified in propNames for the diagram element finder result object, resultObject. propNames must have the names of the properties on the finder result object or the diagram element represented by the finder result object.


    collapse all

    Find the property values of the diagram elements in the slrgex_sf_car model.

    Run the following command to access the supporting files used in this example.


    Import the required packages to avoid using long, fully qualified class names.

    import slreportgen.finder.*

    Load the model and search for diagram elements in the model. For each result object, print the Type property.

    model_name = 'slrgex_sf_car';
    diagFinder = DiagramFinder(model_name);
    diagrams = find(diagFinder);
    for diag = diagrams
        elemFinder = DiagramElementFinder(diag);
        elemFinder.Types = "slfunction";
        for elems=find(elemFinder)

    Input Arguments

    collapse all

    Finder result object, specified as an slreportgen.finder.DiagramElementResult object.

    List of properties values to access, specified as a string array or cell array of characters.

    Valid propNames elements are:

    If propNames contains invalid properties, the corresponding cell array value is N/A.

    Output Arguments

    collapse all

    Values of the accessed properties, returned as a cell array.

    Version History

    Introduced in R2022a