7.6. Extending Built-in Types

Engineering Knowledge Manager

Administration Guide | Chapter 7: Defining Custom Types |

7.5.3. Custom File Formats |  | 7.6.1. Migrating Built-in extensions or Custom Types
Prev |  | Next

## 7.6. Extending Built-in Types

In some situations you may want to extend the properties (or children) of a built-in type rather than create a new type. For example, you may want to simply add some user-defined properties or actions to a built-in type. You can achieve this by defining an `extension`. To define an `extension` that adds properties to a built-in type, you will first need to define one or more `mixins` that define the properties or children that you want to add to the built-in type, and then reference the `mixins` in the `extension`. You can also define custom `actions` in an `extension` similar to how you define it for a custom type.

The listing in Example 7.11: Extending a Fluent Case Built-in Type shows an example that extends the `FluentCase` built-in type. It creates an `extension` named `AcmeFluentExtension` that extends `FluentCase`. The `ModelAttributes` mixin was defined in a previous example (see Figure 7.11: ModelAttribute mixin Example). `ModelAttributes` defines user-defined properties that a user will be prompted to enter values for, when a file of this type is uploaded to EKM.

Example 7.11: Extending a Fluent Case Built-in Type

    <extension name="AcmeFluentExtension" extends="FluentCase">
            <mixins>
            	<mixin>ModelAttributes</mixin>
            </mixins>
    </extension>

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.