专业化管理 > 支持可视化和发布 > WVS Creo View 集成 > 显示动态结构 > 示例:CAD 表示的部件 XML 配置
  
示例:CAD 表示的部件 XML 配置
下面提供了可控制 CAD 表示的部件筛选的 XML 文件示例。
Group 1 defines an IBA-named "cad-represented-part" in which its value starts with "crp"
<!-- ####################################################### -->
<!-- This configuration file is used by dynamic part structure visualization to control the CAD Represented Part Filtering. -->
<!-- -->
<!-- ####################################################### -->
<!-- # The following XML elements and attributes are used to control CAD Represented Part Filtering # -->
<!-- # defined by the following XML schema CADRepresentedPartConfiguration.xsd # -->
<!-- ####################################################### -->
<!-- -->
<!-- Element: "cad-represented-parts" = Declaration element for all control options pertaining to CAD Represented Part Filtering. -->
<!-- Element: "group" = defines a set of CAD Represented filters displayed on the UI -->
<!-- Attribute: "id" = String value representing a unique id for the "group" element. -->
<!-- Attribute: "name" = If attribute "resource_name" is defined the value is used to access the entry in the resource -->
<!-- bundle for the name of the "group" else if "resource_name" is not present the value will -->
<!-- be displayed as is on the UI for the name of the "group" element. -->
<!-- Attribute: "description" {optional} = If attribute "resource_name" is defined the value will be used to access the entry in the -->
<!-- resource bundle for the description of the "group" else if "resource_name" is not defined -->
<!-- the value will be displayed as is on the UI for the description of the "group" element. -->
<!-- Attribute: "resource_name" {optional} = Resource class to use to pull the "name" and "description" attribute values from. -->
<!-- If this is defined for a "group" element the attributes "name" and "description" -->
<!-- on the "group" element will be used as the keys to the entries in the resource file. -->
<!-- Attribute: "default" {optional} = Sets the default value for the preference "group" to checked (enabled) or -->
<!-- unchecked (disabled), if not defined the default will be "disabled" -->
<!-- Element: "iba" = Defines a single part attribute to indicate the part as a "CAD Represented Part". -->
<!-- Element: "name" = An attribute name that exists on a part in which its value can be used to determine if a part is -->
<!-- a "CAD Represented Part". NOTE: The IBA types supported for this feature are String and boolean -->
<!-- Element: "regex" = A Java regular expression used to determine if the attribute value equates to a "CAD Represented Part" -->
<!-- Element: "object-type" = String name of a Windchill defined WTPart or soft type of WTPart. -->
<!-- -->
<!-- ############# -->
<!-- # Example 1 # -->
<!-- ############# -->
<!-- Defines Two cad-represented-parts: -->
<!-- Group 1 defines an IBA named "cad-represented-part" in which its value starts with "crp" -->
<!-- and will be considered a CAD Represented Part. The group is enabled. -->
<!-- -->
<!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" -->
<!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" -->
<!-- -->
<!-- Group 2 defines an IBA value of "cad-represented-part2" -->
<!-- in which if its value is true will be considered a CAD Represented Part, The group is disabled. -->
<!-- NOTE: Must use true or false for the regex value for boolean attributes. -->
<!-- -->
<!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" -->
<!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" -->
<!-- -->
<!-- <cad-represented-parts> -->
<!-- <group id="1" name="Name of the group displayed on the preference UI" -->
<!-- description="Description of group displayed on preference UI" default="enabled"> -->
<!-- <iba> -->
<!-- <name>cad-represented-part</name> -->
<!-- <regex>crp.*</regex> -->
<!-- </iba> -->
<!-- </group> -->
<!-- <group id="2" name="Name of the group displayed on the preference UI" -->
<!-- description="Description of group displayed on preference UI" default="disabled"> -->
<!-- <iba> -->
<!-- <name>cad-represented-part2</name> -->
<!-- <regex>true</regex> -->
<!-- </iba> -->
<!-- </group> -->
<!-- </cad-represented-parts> -->
<!-- -->
<!-- ############# -->
<!-- # Example 2 # -->
<!-- ############# -->
<!-- Defines a "cad-represented-parts" with one entry which -->
<!-- defines the entry for "object-type" to have a value of "org.rnd.ECADSoftType" which is a Windchill softtype, The -->
<!-- group is disabled. -->
<!-- -->
<!-- Group "name" will be displayed as the string literal: "Name of the group displayed on the preference UI" -->
<!-- Group "description" will be displayed as the string literal: "Description of group displayed on preference UI" -->
<!-- -->
<!-- <cad-represented-parts> -->
<!-- <group id="1" name="Name of the group displayed on the preference UI" -->
<!-- description="Description of group displayed on preference UI" default="disabled"> -->
<!-- <object-type>org.rnd.ECADSoftType</object-type> -->
<!-- </group> -->
<!-- </cad-represented-parts> -->
<!-- -->
<!-- ############# -->
<!-- # Example 3 # -->
<!-- ############# -->
<!-- Defines a cad-represented-parts with three entries and is enabled: -->
<!-- First entry defining an IBA value "cad-represented-part" in which if its value is true -->
<!-- will be considered a CAD Represented Part. -->
<!-- NOTE: Must use true or false for the regex value for boolean attributes. -->
<!-- Second entry defining a soft type value of "org.rnd.ECADSoftType1" -->
<!-- Third entry defining a soft type value of "org.rnd.ECADSoftType2" -->
<!-- -->
<!-- Group name is defined by the resource class and key pairs: -->
<!-- resource class = "com.ptc.wvs.resource" defined by the attribute "resource_name" on element "group" -->
<!-- resource key = "name_key" defined by the attribute "name" on element "group" -->
<!-- Group description is defined by the resource class and key pairs: --> <!-- resource class = "com.ptc.wvs.resource" defined by the attribute "resource_name" on element "group" -->
<!-- resource key = "description_key_key" defined by the attribute "name" on element "group" -->
<!-- -->
<!-- <cad-represented-parts> -->
<!-- <group id="1" name="name_key" -->
<!-- description="description_key" resource_name="com.ptc.resource" default="enabled"> -->
<!-- <iba> -->
<!-- <name>cad-represented-part</name> -->
<!-- <regex>true</regex> -->
<!-- </iba> -->
<!-- <object-type>org.rnd.ECADSoftType1</object-type> -->
<!-- <object-type>org.rnd.ECADSoftType2</object-type> -->
<!-- </group> --> <!-- </cad-represented-parts> -->
<!-- ####################################################### -->
-<cad-represented-parts>
-<group default="enabled" description="Defines an IBA named CRP
where all objects that match the Java regex 'crp.*'
will be treated as a cad represented part."
name="CAD Represented Part" id="1">
-<iba>
<name>CRP</name>
<regex>crp.*</regex>
</iba>
</group>
</cad-represented-parts>