This article provides example configurations for how to create and manage an assets list in SystemWeaver. Examples of assets that you may want to manage in a list could be variables, signals, parameters, constants, etc. The example used here is for parameters. 


Example Meta Model

The small, example meta model used here contains a Design Architecture with Functions built up of Software components (SWCs) that have Parameters. Besides the Design, there is a Parameter list. 




Configurable Grid

One option is to configure a grid to go through the system and present all assets that are found. In our example, it will show the parameters within the design when the Parameter list item is selected: 


Configuration

<Grid>
<Parameters>
    <Parameter name="p1" caption="System" hintContextPath="PALI">
        <Values>
            <ForEachPathReference path="PALI">
                <AddValue/>            
            </ForEachPathReference>        
        </Values>    
    </Parameter>
</Parameters>
<Context name="x">
    <AddParts owner="p1" sid="3VDA" part="Designs" defobj="Design"/>
    <AddParts owner="Design" sid="ITFD" part="FuncLevels" defobj="FuncLevel"/>
    <AddParts owner="FuncLevel" sid="ITAP" part="Functions" defobj="Function"/>
    <AddParts owner="Function" sid="ITFC" part="SWCs" defobj="SWC"/>
    <AddParts owner="SWC" sid="PARA" part="Params" defobj="Param"/>
</Context>
  <Columns>
    <ItemNameColumn width="200"/>
  </Columns>
  <ForEachInContext name="x" group="Param">
    <Row/>
  </ForEachInContext>
</Grid>


Result


The drawback with this approach is that it is hard to keep track of changes. As soon as an asset is added to the system, the grid will show it. In other words, it is hard to see what has been added and how the list of assets looked previously.


Part List Editor

An alternative is to maintain a list of assets that are periodically synchronized with the system using the Part list editor (File>Configure the Explorer>Part list editor). The list will then keep track of the previous state and display what assets are currently in the system. The grid configuration can be used as a starting point for configuring the Part list editor


Configuration

<Config id="ParamList">
    <ViewSettings>
       <Caption>Synchronize parameters</Caption>
       <RibbonGroup>Test</RibbonGroup>
       <Description>Hint shown in the ribbon</Description>
    </ViewSettings>
    <TopItemType>2P09</TopItemType>
    <PartTypes>
       <PartType itemType="2P08">2IPG</PartType>
    </PartTypes>
    <UIMessages>
      <UIMessageAdd>Include</UIMessageAdd>
      <UIMessageIgnore>Exclude</UIMessageIgnore>
      <UIMessageMappingColumnHeading>Mapping status</UIMessageMappingColumnHeading>
      <UIMessageAllocatedHeading>Mapping status</UIMessageAllocatedHeading>
    </UIMessages>
    <RightSide>
      <ContextTree>
        <Parameters>
          <Parameter name="p1" caption="System" hintContextPath="PALI">
            <Values>
              <ForEachPathReference path="PALI">
                <AddValue/>            
              </ForEachPathReference>        
            </Values>    
          </Parameter>
        </Parameters>      
        <Context name="x">
          <AddParts owner="p1" sid="3VDA" part="Designs" defobj="Design"/>
          <AddParts owner="Design" sid="ITFD" part="FuncLevels" defobj="FuncLevel"/>
          <AddParts owner="FuncLevel" sid="ITAP" part="Functions" defobj="Function"/>
          <AddParts owner="Function" sid="ITFC" part="SWCs" defobj="SWC"/>
          <AddParts owner="SWC" sid="PARA" part="Params" defobj="Param"/>
        </Context>
        <Tree startGroup="Param">
        </Tree>
      </ContextTree>
    </RightSide>  
    <AdditionalLeftColumns> 
    </AdditionalLeftColumns> 
  </Config>


The context defined in the grid is used to configure a ContextTree to show all parameters in the system.


Adding this as a configuration of the Part list editor provides end-users with a button named “Synchronize parameters” on the Items Ribbon that is activated when a Parameter list item is selected. 


Result


The left-side pane lists the parameters in the parameter list. The right-side pane lists the parameters in the system. The parameters included in the selected parameter list are shown as “Included”. The parameters that are included, but are of different versions than in the list, are shown in yellow.


This setup can be used to manage any assets in the system as needed.