Setting Auto Generated Name Feature for Cloned Objects

You can define the auto-name feature to work only on certain object types or subtypes by adding the AutoGeneratedObjectName administrative property on each of the types. The autoname feature is not limited to Document types and can be used on any type.

You must be logged in as a user who has administrative privileges.

  1. Open the Run MQL window:
    1. From the compass, select Collaboration and Approvals.
    2. In the navigation pane, click Utilities > Run MQL.
    To run an MQL command, enter the command in the MQL Command box and click Run or press Enter.
  2. To set the context for the MQL session, run this command:

    set context user creator;

  3. To add the ability to automatically generate names, run this command:

    modify type <TYPENAME> property AutoGeneratedObjectName value True;

    where <TYPENAME> is the name of the type.

    To turn the auto-name functionality off, set the value to false.

    As installed, not all types have a Number Generator object defined in 3DSpace (see About Autonaming Business Objects). When a cloning process occurs and this administrative property is set to true, it will look for the Number Generator defined for the type. If the Number Generator object does not exist, it will try to look up its class hierarchy to find one. If one is found, it will be used to auto-generate the object name. If none is found after the top class in the hierarchy has been reached, an exception will be thrown to indicate it.

    Setting the administrative property "AutoGeneratedObjectName" to true on any type that has the Number Generator object defined does not guarantee that the auto-name for a cloned object will happen. It depends on the implementation of the object being cloned. To guarantee that auto-name will happen, the cloneObject() method of the DomainObject class must be called.

  4. Restart the app server. If using a J2EE implementation, run the warutil and deploy files as usual.