Configuring the PVS Optimize Utility > Advanced PVS Optimize Utility Configuration > Using the PVS Optimize Utility to Add Attributes to PVS Files from XML input
  
Using the PVS Optimize Utility to Add Attributes to PVS Files from XML input
To easily add new attributes to Creo View components in PVS and ED files, insert properties through input from an XML files. The attributes will consequently appear on the related components when viewing Creo View. To add attributes, perform these steps:
1. Verify that the following two recipe options are selected:
Output Geometry on the Basic tab
Convert > Geometry on the Parameters > Miscellaneous tab
Alternatively, type the following command lines:
adapter/loadShape=1
adapter/outputShape=1
2. Run following command:
pvsoptimizebatch.bat <filename> -p <outputPath> -attrxml <xmlFileName>
* 
No geometry or structural changes are made to the assembly.
The following XML file example adds properties to the PVS File Properties and TOP-ASSEM groups on the root component, SUB-ASSEM group on a sub-assembly node, and SUB-PART group on two part nodes.

<?xml version="1.0" encoding="UTF-8"?>
<pvs_properties>
<comp>
<propertygroup name="PVS File Properties">
<property name="Adapter_name" value="Creo Parametric" />
<property name="Adapter_type" value="Debug" />
</propertygroup>
<propertygroup name="TOP-ASSEM">
<property name="Numparts" value="3" />
</propertygroup>
<comp id="39">
<propertygroup name="SUB-ASSEM">
<property name="Numparts" value="2" />
</propertygroup>
<comp id="39">
<propertygroup name="SUB-PART">
<property name="Shape" value="Block" />
</propertygroup>
</comp>
<comp id="44">
<propertygroup name="SUB-PART">
<property name="Shape" value="Cylinder" />
</propertygroup>
</comp>
</comp>
</pvs_properties>
Follow these rules while creating an XML file:
The first and last elements must be <pvs_properties>.
The first <comp> element is for the root assembly and does not contain any <comp id="##"> XML attribute.
The <comp id="##"> should map directly to the component unique identities of the assembly PVS files being updated.
Creo View attribute groups names added for components are defined with <propertygroup> elements.
Each Creo View attribute name and value to be added is defined with a <property> element.