Creating, Editing, and Deleting an Attribute

After creating your specialization types or deployment extensions, you can create, edit, and delete the attributes they are associated with.

Important: 3DSpace is delivered with more than 400 dimensions and their corresponding units by default. Do not change these dimensions as the Data Model Customization, Administrate Data Model, and 3DSpace Configuration Center customization tools rely on them. Any change could introduce discrepancies between the client and the server, and corrupt data. Therefore, only Dassault Systèmes can update 3DSpace dimensions, that is, dimensions prefixed by DSDim_.

This task shows you how to:


Before you begin: You must have created a type or extension.

Create a Simple Attribute

You can create an attribute stored in the database.

Note: Attributes names can contain alphanumeric characters and the underscore _ character only.

  1. Click the type or extension to which you want to add an attribute.
    The line corresponding to the selected type or extension turns pink.
  2. In the Attributes List frame, click New Simple .
    The Create New Attribute window opens.
  3. Define the attribute as follows:
    1. In the Name field, enter a name for your attribute.

      Note: Names can only contain alphanumeric characters and the underscore character.

      The Package prefix is automatically added at deployment.

    2. Select its type in the Type list.

      When using magnitudes, use the Magnitude chooser. For an attribute with a magnitude, the default value is expressed in the preferred unit. If you change this unit, the default value is reset.

    3. Select the unit if need be.
    4. In the Multivaluated list, select true or false.

      • Multivaluated attributes are available for IRPC modelers only.
      • A multivaluated attribute can have authorized values.

    5. If need be, enter the authorized values. If you want to add multiple values, enter the first value into the Authorized values field, then click + to display additional boxes.

    6. In the Default Value field, enter a value. If you defined authorized values, your default value must be one of these values.

    7. In the Length field, enter the maximal length of the attribute.

      Leaving this box blank or entering 0 means no limit.

      This box only makes sense for attributes of String type.

      Recommendation: To optimize the storage resources, define a length that is less than 1000.

    8. From the User Access list, select one of the following:

      • ReadWrite - the attribute value can be modified.
      • ReadOnly - the attribute value can only be modified through a business rule.
      • None - the attribute is never displayed and can only be valuated by a business rule.

    9. From the Reset when Duplicated list, select true if you want the attribute value to be reset when the object owning the attribute is duplicated.
    10. From the Reset when versioned list, select true if you want the attribute value to be reset when a new object version is created.
    11. From the Integrate in 3DXML list, select true if you want to add the type and the attribute to a 3D XML file. If you select true, you also need to define the CustoTool_3DXML_Exportable variable.
    12. From the Searchable list, select true if you want the values for this attribute to be used as search criteria.

      When enabled, you can use 3DSearch for filtering in the Advanced Search. If you also selected a tag name for 6W Predicate, the attribute can be used in Tags filtering.

    13. From the V6/XPDM Exportable list, select true if you want to flag an attribute exportable by default during V6/V6, V6/XPDM data exchanges in briefcases.
    14. From the Mandatory User Input list, select true to require end users to enter a value, or select an authorized value (if you defined any), when they are creating an object.

      Note: This option is only compatible with end-user apps that take it into account. In other words, some end-user apps may still allow end users to save their object even if they do not enter or select any value.

  4. Click Done when you are done with the attribute creation.

Result: The attribute is created.

Notes: To display the attribute in the list, click the type it is related to.
  • The Nature column indicates if the attribute is of Simple or of Transient type.
  • The Deployed column indicates if the attribute is deployed (yes), not deployed (no), or partially deployed (partial), which means that the attribute has already been deployed at least once but has been modified since its deployment.
  • The Type column displays the attribute type.
  • The Default Value column displays the value.
  • The Keys (Package) column shows the keys that constrain the extensions.

Create a Transient Attribute

You can define a transient attribute. This attribute is not stored in the database.

Warning: Transient attributes are deprecated. You should not create any new transient attributes.

A transient attribute is characterized by:

  • Its name.
  • Its type (basic type, magnitude, but also a feature to enable the computation of attributes that are return objects).
  • The fact that it can be multivaluated, have a preferred unit, and can be in read-only or Read/Write mode.
Notes:
  • If you want to display transient attributes on the client side, you must implement the INFRAComputedAttribute opening for the type/attribute_name couple.
  • Transient attributes are not V6/XPDM exportable.

  1. Click the type or extension to which you want to add the attribute.
    The line corresponding to the selected type/extension turns pink.
  2. In the Attributes List frame, click New Transient .
    The Create New Attribute window opens.
  3. Define the attribute.
    1. In the Name box, enter its name.

      The Package prefix is automatically added at deployment.

    2. Select its type from the Type list.

      • When using magnitudes, use the Magnitude chooser. For an attribute with a magnitude, the default value is expressed in the preferred unit. If you change this unit, the default value is reset.
      • When using a PLM Type, select one from the list.

    3. Select the unit if need be.
    4. From the Multi-Valuated list, select true or false.
    5. Select the User Access in the scrolling list:

      • ReadWrite - the attribute value can be modified.
      • ReadOnly - the attribute value can only be modified through a business rule.
      • None - the attribute is never displayed and can only be valuated by a business rule.

    6. In the Reset when Duplicated scrolling list, select true if you want the attribute value to be reset when the object owning the attribute is duplicated.
  4. Click Done when you are done with the attribute creation.

Result: The transient attribute is created.

Notes: To display the attribute in the list, click the type it is related to.
  • The Nature column indicates if the attribute is of Simple or of Transient type.
  • The Deployed column indicates if the attribute is deployed (yes), not deployed (no) or partially deployed (partial), which means that the attribute has already been deployed at least once but has been modified since its deployment.
  • The Type column displays the attribute type.
  • The Default Value column displays the value.

Defining Tags on an Attribute

You can associate a 6W predicate with a new or an existing attribute.

  1. Click the type or extension to which you want to add an attribute.
    The line corresponding to the selected type or extension turns pink.
  2. In the Attributes List frame, click New Simple .
    The Create New Attribute window opens.
  3. Define the attribute.
    1. In the Name box, enter its name.
    2. Click ... next to the 6W Predicate box to select the predicate and click Submit when done.
    3. Select the other attribute characteristics as described in Creating, Editing, and Deleting an Attribute.
    4. Select true in the Indexation list for your attribute to be indexed. If true is not selected, the attribute cannot be used in the Tags.
  4. Click Done when you are done with the attribute creation.

Edit an Attribute

You can edit an attribute after creating it.

  1. Click located at the end of the attribute line.
    The Attribute Properties window opens.
  2. Click Edit.
    The window turns to edit mode.
  3. Edit the properties that you want to modify.
    Note: The only properties that you can modify are the following:
    • Multivaluated (before package deployment only)
      Note: You cannot revert a multivalued attribute as a single-valued attribute once its package deployment was made.
    • Default value
    • User Access
    • Reset when Duplicated
    • Reset when Versioned
    • 6W Predicate
    • Mandatory User Input
    Notes:
  4. Click Done and Cancel when you are done editing.

Delete an Attribute from the User Interface

You can delete any attribute that is not constrained by a unique key.

Recommendation: To massively delete attributes, use the CustoDataTool2 tool. For more information, see Delete an Attribute Using a Shell Script below.

  1. Click the attribute that you want to delete.
  2. Select Delete .
    The attribute is deleted.

Delete an Attribute Using a Shell Script

You can use the CustoDataTool2.sh shell script to delete any attribute that is not constrained by a unique key.

Note: When the -deleteAbsent argument is declared, the metadata file is imported and all missing entities are deleted.

Open a command window and enter the following command: <intall_directory>/server/scripts/CustoDataTool2.sh -file on UNIX and CustoDataTool2.bat on Windows.
For example, enter CustoDataTool2.sh –password creatorPassword -file /tmp/CustoPackage.zip –deleteAbsent.