Main Content

runQuery

Re-run architecture view query on model

Since R2021a

    Description

    runQuery(view) re-runs the existing query on the view view. This function removes elements that no longer match the query and adds elements that now match the query.

    example

    Examples

    collapse all

    Open the keyless entry system example and create a view. Specify the color as light blue, and the query as all components.

    import systemcomposer.query.*
    
    openProject("scKeylessEntrySystem");
    model = systemcomposer.loadModel("KeylessEntryArchitecture");
    view = createView(model,"All Components",...
       Color="lightblue",Select=AnyComponent);

    Open the Architecture Views Gallery to see the new view All Components.

    openViews(model)
    

    Add components to the model. Rerun the query.

    runQuery(view)
    

    Input Arguments

    collapse all

    Architecture view, specified as a systemcomposer.view.View object.

    More About

    collapse all

    Version History

    Introduced in R2021a