Foundations
Every grid view, table or matrix, is built from the same underlying machinery:
The SysideViews library
SysML v2 Expose and Filter mechanisms
A set of ContentView attributes that broaden what the view collects
This page covers those shared parts.
SysideViews Library
Grid views are built on top of types and attributes defined in the SysideViews SysML
library. The library is added to the workspace automatically the first time Views
Explorer is opened, and pulled into a model file with a single
import:
package MyViews {
private import SysideViews::*;
view myTable : SV::TVD::TableView {
expose MyModel::**;
filter hastype SysML::RequirementUsage;
view QualifiedName :> columnViews {
attribute :>> featureToRender = CT::qualifiedName;
}
// additional columns below
}
}
SysideViews library provides the base view types (TableView, MatrixView), column
type catalogue, editable matrix presets, and all configuration attributes that shape how
views render. Throughout the grid view docs, CT::* is used as the short alias for
SysideViews::ColumnType.
Expose and Filter
Every grid view selects model elements using the standard SysML v2 expose and
filter statements. These behave the same way they do for diagram views. For the full
mechanics see Understanding Exposing and Understanding Filters.
Grid views layer additional inclusion rules on top through the ContentView attributes.
ContentView Attributes
Every TableView, every MatrixView row or column view, and every matrix
cellView inherits from ContentView, which provides four boolean attributes that
broaden the pool of elements collected by expose / filter. All four default to
false, and the defaults are the right choice for most views.
Attribute |
Default |
Effect |
|---|---|---|
|
Include elements defined in the SysML standard library. |
|
|
Include reference (non-composite) usages. |
|
|
Include abstract type definitions. |
|
|
Recursively expand each exposed element to include its owned features and heritage chain. |
Warning
Set only the flags relevant to a given model. Combining several at once can broaden the pool unexpectedly.
includeLibraryElements
Elements defined in the SysML standard library (ScalarValues, SysML, etc.) are
excluded even when an expose statement would otherwise reach them. Set this flag to
include them.
includeReferenceElements
Controls whether non-composite features are included in the view. Non-composite features
are declared explicitly with the ref keyword, or implicitly when they appear at
package level rather than as features of a Type.
Example Use Case
Consider a model where a DroneSystem part has a ref part externalSensor : Sensor
convenience reference. A requirements table over DroneSystem::* will exclude
externalSensor by default, keeping the view focused on owned elements. Set this to
true when references are themselves the subject of the view:
part def DroneSystem {
part sensor : Sensor;
ref part externalSensor : Sensor; // non-composite feature, excluded by default
}
view allParts : TableView {
expose DroneProject::DroneSystem::*;
attribute :>> includeReferenceElements = true; // include externalSensor
...
}
includeAbstractElements
Abstract type definitions are excluded by default. Set this flag to include them.
Example Use Case
Consider a model that defines an abstract BaseRequirement definition that several
concrete definitions specialise. The table will show only the concrete definitions
unless this flag is set:
abstract requirement def BaseRequirement {
doc /* Common requirement properties. */
}
requirement def MaxAltitude :> BaseRequirement { ... }
view allRequirements : TableView {
expose DroneProject::*::**;
filter hastype SysML::RequirementDefinition;
attribute :>> includeAbstractElements = true; // include BaseRequirement
...
}
exposeFeaturesAndHeritage
When set to true, each element in the exposed pool is expanded to include its owned
features and full heritage chain: supertypes, their supertypes, and so on, recursively.
Standard-library elements are skipped during this traversal regardless of the
includeLibraryElements setting.
Warning
Heritage traversal can noticeably slow down view population on large models. Scope
expose as tightly as possible when using this attribute.
Example Use Case
Consider a model where definitions form a hierarchy through usages typed by other definitions:
part def Engine;
part def Transmission;
part def Powertrain {
part engine : Engine;
part transmission : Transmission;
}
part def Vehicle {
part powertrain : Powertrain;
}
The hierarchy is expressed through usages:
Vehicleownspowertrain : PowertrainPowertrainownsengine : Engineandtransmission : Transmission
A plain expose of Vehicle returns only Vehicle. With exposeFeaturesAndHeritage
= true, the view follows each usage to its type and collects every definition along
the way. Adding filter hastype SysML::PartDefinition narrows the result to a flat
table of every part definition reachable from Vehicle:
view allParts : TableView {
expose MyPackage::Vehicle;
filter hastype SysML::PartDefinition;
attribute :>> exposeFeaturesAndHeritage = true;
view Name :> columnViews { attribute :>> featureToRender = CT::name; }
view Owner :> columnViews { attribute :>> featureToRender = CT::owner; }
}
// Rows: Vehicle, Powertrain, Engine, Transmission