As an Architect, you can set constraints on the AddPaste and/or New, and Remove part(s)/Deleteoptions typically available for parts in, e.g., the structure tree and Parts view. For example, you may want to allow users to Add existing signal ports, but not create New ones. 



Prerequisites

  • Assignment of the SW Architect role in the database
  • An installation of the SystemWeaver Architect (swArchitect).


  1. In the type structure tree, select the part type for which you want to define a constraint. 
  2. Click Edit Config.

  3. Define the desired constraint expressed using an XML element.
    <PartTypeConfig>
    (constraint)
    </PartTypeConfig>
  4. Click OK to save your changes. 


The following constraints are supported:

  • <AllowAddPart value=""/>
  • <AllowNewPart value=""/>
  • <AllowRemovePart value=""/>
  • <AllowMultiInstance value=""/>


The attribute value for all of these tags can be 'true' (default) or 'false'.


<AllowAddPart> 

Defines if it should be possible to perform an Add action in the GUI, i.e., create a new part using an existing item. (This includes actions with corresponding effect, like Paste.)


<AllowNewPart>

Defines if it should be possible to perform a New action in the GUI, i.e., create a new part using a likewise new item. (This includes actions with corresponding effect, like Another.)


<AllowRemovePart>

Defines if it is possible to perform a Delete or Remove part(s) action in the GUI, i.e., delete a part.


<AllowMultiInstance>

Defines if it is possible to Add a part that already exists under the selected owner item, i.e., allow multiple instances of the same exact part. 


This tag has an additional, optional attribute called allowDifferentVersions. It determines whether or not users can add other versions of an existing part. This option can only be used when AllowMultiInstance is set to 'false'. In other words, you would use the following if you would like to allow users to add different versions of a part under a selected owner item, but not the same versions of a part: 


<AllowMultiInstance ="false" allowDifferentVersions="true">


PartType Configuration Example

<PartTypeConfig>
  <AllowAddPart value="false"/>
</PartTypeConfig>


Example Result

The Add or Paste options will not be available. That is the only constraint. Users can still create new parts, remove parts, and add multiple instances of a part.


Note: This only restricts the behavior in the swExplorer client. It does not restrict API users.