Main Content

扩展架构元素

Add custom properties to architectural elements using stereotypes

System Composer™ provides five built-in element types: components, ports, connectors, interfaces, and functions. Functions are only available in software architectures. Create stereotypes to extend element types with metadata. Package related stereotypes into profiles for use with multiple models using theProfile Editor. Share profiles between models to ensure consistency within a project.

Stereotypes provide a template to define custom concepts and terminologies. Assign custom stereotypes to a model element to define its relation to the system. Properties defined within the stereotype applied to a model element can be used for early analyses, such as budget allocation, latency tradeoffs, and other parametric design concerns. You can add engineering units to property values to establish context.

In this example below, the profileMyCustomProfilecontains multiple stereotypes. TheSoftwareComponentstereotype extends theComponentelements. TheBluetoothLinkstereotype extendsConnectorelements. You can further extend theSoftwareComponentstereotype with theSensorComponentstereotype to include additional properties such as德viceIDandFailureProb.

UML diagram of a custom System Composer profile.

Classes

Functions

expand all

systemcomposer.profile.Profile.createProfile Create profile
systemcomposer.loadProfile 加载配置文件,name
applyProfile Apply profile to model
removeProfile Remove profile from model
renameProfile Rename profile in model
systemcomposer.profile.editor Open Profile Editor
systemcomposer.profile.Profile.find Find profile by name
systemcomposer.profile.Profile.load Load profile from file
save Save profile as file
open 打开配置文件
close Close profile
systemcomposer.profile.Profile.closeAll Close all open profiles
systemcomposer.profile.Stereotype.find Find stereotype by name
getDefaultStereotype Get default stereotype for profile
setDefaultStereotype Set default stereotype for profile
getDefaultElementStereotype Get default stereotype for elements
setDefaultElementStereotype Set default stereotype for elements
addStereotype Add stereotype to profile
removeStereotype Remove stereotype from profile
getStereotype Find stereotype in profile by name
applyStereotype Apply stereotype to architecture model element
batchApplyStereotype Apply stereotype to all elements in architecture
getStereotypes Get stereotypes applied on element of architecture model
removeStereotype Remove stereotype from model element
hasStereotype Find if element has stereotype applied
addProperty 德fine custom property for stereotype
removeProperty Remove property from stereotype
hasProperty Find if element has property
setProperty Set property value corresponding to stereotype applied to element
getProperty Get property value corresponding to stereotype applied to element
getPropertyValue Get value of architecture property
getEvaluatedPropertyValue Get evaluated value of property from element
getStereotypeProperties Get stereotype property names on element

Tools

Profile Editor Create and manage profiles with stereotypes and properties
Instantiate Architecture Model Create an instance of the architecture model that you can use for analysis
Analysis Viewer View and edit analysis instance model and analyze using analysis function

Topics