Subtyping CAD Documents
In CAD authoring tools, you can create restricted value parameters that use definitions from a restriction definition file. The restriction definition file defines the parameter name, type, value, range of values and a default value. This feature is useful because it allows you set an attribute for a specific object-type and then set a specific range of acceptable values.
Constraining Attributes
The Windchill counterpart to restricted value parameters is the subtyping feature. Subtyping is accessible through the Type and Attribute Management utility and allows you to add constraints (such as a value or range of values) to an instance-based attribute. Additionally, you can use the Type and Attribute Management utility to add attributes to the EPMDocument type and its subtypes: both the CAD document and dynamic document (Arbortext document) subtypes.
For CAD documents there is one “system-provided” subtype. This subtype can be modified by an administrator to add attributes that can have different values for each iteration of the object. This subtype cannot be deleted. For more information, see Flexible Soft Typing.
Following are additional subtypes related to CAD documents.
• CAD Document Master subtype (on CAD Document Master type)
Attributes that are added to this subtype have only one value for all iterations.
Changing the value of an attribute on a CAD Document Master subtype changes that value for all iterations.
• CAD Document Uses Link subtype (on CAD Document Uses Link type)
Attributes that are added to this subtype are specific to the use of an iteration of an object. For example, if there are four bolts of the same type (bolt.prt) in an assembly, and each bolt needs to be tightened to a specific torque, you can add torque to the Uses Link subtype and then apply a different value to each occurrence of the bolt in the assembly. (In contrast, if you instead add this attribute to the CAD Document subtype, then all bolts in all assemblies would have the same torque wherever they are used.)
• CAD Document Reference Link subtype (on CAD Document Reference Link type)
Attributes that are added to this subtype apply to reference links (again, not to the CAD document, itself).
Flexible Subtyping
The term “flexible” subtyping refers to the ability to specify certain CAD document types or subtypes be created when a CAD model is initially checked into Windchill. Combined with the ability to specify what Windchill part subtype is created at auto association (based on the CAD document sub type), it streamlines the process of attribute segmentation among appropriate subtypes.
For example, with administrative privileges, you can access the Type and Attribute Management utility, select the CAD Document subtype, and using a right-mouse-button command, create a new subtype for the CAD Document subtype.
Note that in the user interface for creating the new subtype, there is a field to specify the default part subtype to be created for this CAD document subtype.
Attributes sets are by default inherited from the supertype, but can be redefined, as required.
Using EPMDefaultSoftType.xml
For details on subtyping, selecting attributes, and setting constraints, refer to the Windchill Help Center topics on type and attribute management. In addition, there is a file, EPMDefaultSoftType.xml, located at WT_HOME\codebase\com\ptc\windchill\uwgm\aad\xml, which can be copied to WT_HOME\codebase. The copy of the file can be edited to specify default subtypes. A restart of the method server is required for the edits to take effect.
The default subtypes for the authoring application Creo Parametric are as follows.
<AuthAppSoftTypeInfo authAppName="PROE">
<ObjectClassInfo classType="EPMDocument">
<ObjectTypeInfo type="*">
<SoftTypeInfo softTypeId="${internet_domain_name}.DefaultEPMDocument"/> <!-- null sub type -->
<SoftTypeInfo subType="*" softTypeId="${internet_domain_name}.DefaultEPMDocument"/>
</ObjectTypeInfo>
</ObjectClassInfo>
</AuthAppSoftTypeInfo>
where the line
<SoftTypeInfo softTypeId="${internet_domain_name}.DefaultEPMDocument"/>
is applicable only for the null subtype, and the line
<SoftTypeInfo subType="*" softTypeId="${internet_domain_name}.DefaultEPMDocument"/>
usually serves as a default mapping for a given type (or all types for which no mapping is explicitly specified if the type = *).
To define a default subtype:
1. Create a file with the name EPMDefaultSoftTypes.xml in the $WT_Home/codebase directory.
2. Assume that “${internet_domain_name}.CreoDoc” is the subtype name already defined in the Type and Attribute Management utility. To use this subtype for all Creo Parametric file types, replace "${internet_domain_name}.DefaultEPMDocument" with “${internet_domain_name}.CreoDoc.” Add the following entry to $WT_HOME/codebase/EPMDefaultSoftTypes.xml:
<SoftTypeDescriptor xmlns='http://www.ptc.com/SoftTypeDescriptor'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.ptc.com SoftTypeDescriptor.xsd'>
<AuthAppSoftTypeInfo authAppName="PROE">
<ObjectClassInfo classType="EPMDocument">
<ObjectTypeInfo type="*">
<SoftTypeInfo softTypeId="${internet_domain_name}.CreoDoc"/> <!-- null sub type -->
<SoftTypeInfo subType="*" softTypeId="${internet_domain_name}.CreoDoc"/>
</ObjectTypeInfo>
</ObjectClassInfo>
</AuthAppSoftTypeInfo>
<SoftTypeDescriptor>
3. Restart the method server.