Specialized Administration > Supporting Visualization and Publishing > WVS Creo View Integration > Visualizing Dynamic Structures > Using Populate Part Uses Occurrence Utility
  
Using Populate Part Uses Occurrence Utility
From Windchill 11.2 release onwards, the dynamic structure supports displaying representations for Image or Contributing image-associated WTPart from their corresponding EPMDocuments instead of displaying the default representation from the part itself (if present).
* 
The preference Display representations from image associated EPM documents must be enabled for the Image or Contributing image-associated EPMDocument representations to display correctly in the dynamic part structure in Creo View or Visualization tab.
For the Image or Contributing image-associated EPMDocument representations to display correctly in the dynamic part structure, the part occurrence link should be updated with appropriate EPMDocumentMaster OID. One way to do this is by building or rebuilding the part structure from CAD on Windchill 11.2 or later releases.
However, if you do not want to rebuild the entire part structure again (especially in case of legacy part structure data coming from older Windchill releases), the Populate Part Uses Occurrence Utility can be used to update the part occurrence links in Windchill.
* 
The Populate Part Uses Occurrence Utility is supported only for occurrence links where the parent WTPart in the occurrence link is associated with Creo Parametric and CATIA V5 data.
* 
This utility relies on the component IDs and expects representations and CAD documents to have the same component IDs. For CATIA V5 data, refer to the article CS210894 for information about enabling recipe option for assigning component IDs from a CAD document to a representation when publishing.
About the Populate Part Uses Occurrence Utility
This is a multi-threaded utility that must be executed by the Site Administrator from Windchill Shell.
Following actions can be performed with this utility:
count — Get the count of instances of part usage occurrence links that are eligible for updates.
run_population — Update the eligible instances with necessary information (OID of the EPM Document Master that has built the child WTPart of the link in the WTPart structure) in the database.
Using run_population action, you can update the part occurrence links with -iterations parameter to specify which parent object history should be processed. Following are the supported actions:
1. All iterations — all revisions and iterations of an object.
2. Latest only iterations — the latest iteration of the latest revision of an object.
3. Latest iterations for each revision — the latest iteration of each revision of an object.
* 
The default option value is 2 that is Latest only iterations, if not specified.
As per the given inputs, the utility updates the corresponding part usage occurrence with missing information (Built by Master Reference) when the occurrence is present in the part structure due to an Image or Contributing image association.
* 
The successfully updated occurrence link’s “Last Modified” date is updated and the update count increases for the same in the database.
To Run the Utility
This utility should be run by the Site Administrator from the Windchill Shell using the following commands as required.
windchill com.ptc.wvs.server.util.builtbymaster.PopulatePartUsesOccurrenceUtility -h | -help
To view the help of the utility
* 
To know more about any parameter information and possible values, use the help command.
windchill com.ptc.wvs.server.util.builtbymaster.PopulatePartUsesOccurrenceUtility -count
To get the count of instances of part usage occurrence links that are eligible for updates.
windchill com.ptc.wvs.server.util.builtbymaster.PopulatePartUsesOccurrenceUtility -run_population
Update the eligible instances with necessary information. By default, this updates the latest only iteration when the parameter ‘-iterations’ is not specified. For more supported parameters, use ‘-help’ command.
* 
For example: windchill com.ptc.wvs.server.util.builtbymaster.PopulatePartUsesOccurrenceUtility -run_population -username=wcadmin -password=wcadmin -iterations=1 -batchsize=10 -threadcount=5 -threadtimeout=20 -threadtimeoutunit=MINUTES -timebox=6 -timeboxunit=HOURS
Understanding the Output
After completion of the utility program, the following output appears in the Windchill shell terminal.
1. count operation
There are currently 4 WTParts of which 13 child occurrence links which has no built by master reference.
2. run_population
Population of part occurrence links completed.
Total execution time to perform processing : 2.880 second(s)
Number of WTParts of which immediate child occurrence links are successfully updated : 1
Number of WTParts of which immediate child occurrence links are failed to update : 0
Number of WTParts of which immediate child occurrence links are skipped to update : 1
Number of Part Occurrence links successfully updated with built by master reference : 4