Create a Specialization Type
You can create as many types and subtypes as required.
-
From the sidebar, select Specialize Data Model.
-
From the List of Specialization Packages, click the package to
which you want to add a type.
-
From the Types List table, select the check box of the type that
you want to specialize and click New
.
The Create New Sub Type panel opens. The parent type name
appears in the Parent Type field.
-
In the Name field, enter a name for your subtype.
Note:
Names can only contain alphanumeric characters and the underscore
character.
-
When working with references and representations, you can select the instance to be
used from the Instance list.
Notes:
- Instances listed in the list are the instances of the current package.
- If no instance name is specified for the type, the instance name of its parent
is used by inheritance.
- The package prefix is automatically added at deployment.
-
From the Mask Parent list, select true
if you want to hide from the user interface of the compatible end-user apps the
default Dassault Systèmes type from which you are deriving your specialization type.
This option ensures that the end users select your specialization type when creating
new objects, rather than the default Dassault Systèmes type
from which you derived it.
Notes:
- This option only hides the default Dassault Systèmes
type found in the hierarchy of your specialization type; it does not hide any
specialization types. This means that if you are creating a specialization type
by deriving a type that is also a specialization type, this option does not hide
this type. Instead, it hides the default Dassault Systèmes
type from which the first specialization type was derived in the hierarchy of
the specialization type you are currently creating.
- Selecting true for at least one specialization type in
the hierarchy hides the default Dassault Systèmes
type.
- This option is only compatible with end-user apps that take it into account. In other words, some end-user apps may still display the default Dassault Systèmes
type on their user interfaces even if you select true.
- Optional:
Add an icon to your type by doing the following:
-
Save your icon in
<OSDir>\resources\graphic\icons using the
following naming convention: I_<MyType>48x48. Only the
.bmp and the .png formats are
supported.
-
In the Icon Name field, enter the name of the icon you
want to add to your subtype, without the icon extension.
- Optional:
In the Comment field, add a comment.
-
Click Done.
Result: The new type deriving from its parent type appears in the
Types List, below its parent type. Notes:
- The Ownership column indicates if the type belongs to a DS
parent package or a customized one from the current package.
- The # of Extensions In Other Packages column shows the number
of extensions in other specialization or deployment
packages.
- The Deployed column indicates if the type is deployed or
not.
- The Attributes column indicates the number of
attributes.
- The Comment column shows the comments if any.
Create an Abstract Type
You can create an abstract type you will use to derive and factorize. These
types cannot be instantiated and are not displayed in the desktop apps.
The Abstract option:
- is set using True or False in the
interface. The state can be easily modified.
- is displayed at the creation of an element and when you want to edit an element.
- is available for specialization types and customer extensions only.
-
From the sidebar, select Specialize Data Model.
-
From the List of Specialization Packages table, click the
package to which you want to add a type.
-
From the Types List table, select the type that you want to
specialize and click New
.
The Create New Sub Type panel opens. The parent type name
appears in the Parent Type field.
-
In the Name field, enter a name for your subtype.
Note:
Names can only contain alphanumeric characters and the underscore
character.
-
From the Abstract list, select
true.
- Optional:
Add an icon to your type by doing the following:
-
Save your icon in
<OSDir>\resources\graphic\icons using the
following naming convention: I_<MyType>48x48. Only the
.bmp and the .png formats are
supported.
-
In the Icon Name field, enter the name of the icon you
want to add to your subtype, without the icon extension.
- Optional:
In the Comment field, add a comment.
-
Click Done.
Edit a Specialization Type
You can add attributes to a specialization type.
-
From the Types List table, select the type to which you want to
add an attribute.
The type line turns pink.
-
Click New Simple
in the
Attributes tab.
-
Define the new attribute.
For more information, see Creating, Editing, and Deleting an Attribute.
Result: The attribute is added to the type. Notes:
- You can change the instance used on references and representations. Click the icon
located next to the type to edit it.
- You can add icons to existing types.
- You can change the Mask Parent option.
Edit an Abstract Type
You can modify the abstract status of a type.
-
From the Types List table, select the type.
-
In the Details column, click Edit
.
-
From the Abstract list, select true or
false.
-
Click Done.
Delete a Specialization Type From the User Interface
You can delete specialization types if they are not deployed and if there are no
objects of this type. Notes:
- A type with sub-types cannot be deleted. Delete the sub-types first and then delete
the type.
- You cannot simultaneously select a type and its sub-type to delete them. Delete the
sub-type first.
-
From the Types List table, select the type.
-
Click Delete
.
All attributes related to this type are deleted.
Delete a Specialization Type Using a Shell Script
You can use the CustoDataTool2.sh shell script to delete specialization types if
they are not deployed and if there are no objects of this type.
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.
|