Advanced Customization > Business Logic Customization > Customizing Windchill Visualization Services > Custom Publishing > Solution > Procedure – Getting Representables and Representations > findRepresentable
  
findRepresentable
To simplify the concept discussed above, there is a method called findRepresentable in com.ptc.wvs.common.ui.VisualizationHelper. This method allows you to pass in a Representable and always get back the right Representable in the case where actively associated parts are involved. In the case where there are no actively associated parts, it simply returns the object you passed in. The method signature is shown below:public Representable findRepresentable(Persistable d)
public Representable findRepresentable(Persistable d)
If you have custom code that is dealing with Representables, it is a good practice to use this method so you can be sure to have the right Representable that is associated to the Representations. Also, note that if you pass in a Persistable that is not a Representable, the method will return null. You must have an instance of VisualizationHelper to use this method. For example:
VisualizationHelper vizHelper = new VisualizationHelper();
Representable repable = vizHelper.findRepresentable(d);