主要内容

runQuery

Re-run architecture view query on model

    Description

    example

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

    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.

    importsystemcomposer.query.*scKeylessEntrySystem model = systemcomposer.loadModel("KeylessEntryArchitecture"); view = createView(model,"All Components",...颜色="lightblue",Select=AnyComponent);

    Open theArchitecture Views Gallery看新的视图All Components.

    OpenViews(model)

    Add components to the model. Rerun the query.

    Runquery(视图)

    Input Arguments

    collapse all

    体系结构视图, specified as asystemcomposer.view.View目的。

    More About

    collapse all

    Definitions

    Term Definition Application More Information
    view

    Aviewshows a customizable subset of elements in a model. Views can be filtered based on stereotypes or names of components, ports, and interfaces, along with the name, type, or units of an interface element. Create views by adding elements manually. Views create a simplified way to work with complex architectures by focusing on certain parts of the architectural design.

    You can use different types of views to represent the system:

    • 操作视图demonstrate how a system will be used and should be integrated with requirements analysis.

    • Functional viewsfocus on what the system must do to operate.

    • Physical viewsshow how the system is constructed and configured.

    A viewpoint represents a stakeholder perspective that specifies the contents of the view.

    Modeling System Architecture of Keyless Entry System
    element group

    Anelement groupis a grouping of components in a view.

    使用元素组编程填充视图。

    query

    Aquery是描述模型元素满足的某些约束或标准的规范。

    Use queries to search elements with constraint criteria and to filter views.

    Find Elements in Model Using Queries
    component diagram

    Acomponent diagramrepresents a view with components, ports, and connectors based on how the model is structured.

    Component diagrams allow you to programmatically or manually add and remove components from the view.

    Inspect Components in Custom Architecture Views
    层次图

    You can visualize a层次图as a view with components, ports, reference types, component stereotypes, and stereotype properties.

    There are two types of hierarchy diagrams:

    • Component hierarchy diagramsdisplay components in tree form with parents above children. In a component hierarchy view, each referenced model is represented as many times as it is used.

    • Architecture hierarchy diagramsdisplay unique component architecture types and their relationships using composition connections. In an architecture hierarchy view, each referenced model is represented only once.

    显示Component Hierarchy and Architecture Hierarchy Using Views

    Version History

    Introduced in R2021a