cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Representation always picks an older CAD version while creating

MV_10441462
12-Amethyst

Representation always picks an older CAD version while creating

Hi all

 

I have got a WTPart(1.01) link to an EPMDocument(1.01). I perform an attribute update using a custom tool which results in iteration i.e WTPart(1.02) and EPMDoc(1.02). When I try to create a representation from the WTPart(1.02) it picks the EPMDocument(1.01) to create the representation though latest config is specified. 

I get the following warning in WVS Job Monitor Warning: EPMDocument Config Spec selects a different iteration of the specified top level EPMDocument, specified EPMDocument iteration will be used.

I actually want it to take the latest version of EPMDoc(1.02) for creating representation.

Can somebody please help me understand this issue or correct me if my approach is wrong?

Thanks in advance.

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @MV_10441462 

I forgot to answer 😄

Yes there is an API that is used by the function but it is not documented and not supported for custom functions because it is not documented in the javaDOC

 

WTHashSet buildEPM = new WTHashSet();
buildEPM.addElement(epm);

ConfigSpec configSpec = new EPMConfigSpecFilter(EPMDocConfigSpec.newEPMDocConfigSpec(), EPMFilters.NO_WORKING);

WTCollection buildedEPM = BuildHelper.buildFromCAD(buildEPM, configSpec, true);

 

 

PetrH

View solution in original post

4 REPLIES 4

I believe this is because publishing normally uses the As Stored configuration unless you set Windchill to publish to the latest iteration. We had similar problems before, so PTC made a fix with the publish.representable.owner.usefirstiteration property. Set this to false and propagate to codebase/WEB-INF/conf/wvs.properties. 

 

As always: Be sure to test in a suitable environment before rolling out to your production server.

Check out this post https://community.ptc.com/t5/Windchill/Is-PTC-s-spec-faulty-Publish-EPMDoc-updates-non-latest-WTPart/m-p/45545 and see if the behaviour described there matches your issues.

Hi @MV_10441462 

If you use customization to update some attributes, you need to keep the CAD and WTP in synchronization. 

For example, if you update WTP attribute you should update also CAD and link between them. 

For example  HelesicPetr_0-1687761974789.png does this job for user. The function update all WTP attributes from CAD and also Link.

If you use it it solve your issue.

 

But you need to find custom solution in your code. . For example you should use check in operation with both objects together in a collation. This can solve your issue that WTP is linked to previous version that is normal behavior if you checkin WTP as a first object. . 

PetrH

 

Hi @HelesicPetr 

Thankyou so much for your response. Yes the action "Build Associated Part" did the trick. But how can we make use of it in API i.e how can we update the link in API?

Hi @MV_10441462 

I forgot to answer 😄

Yes there is an API that is used by the function but it is not documented and not supported for custom functions because it is not documented in the javaDOC

 

WTHashSet buildEPM = new WTHashSet();
buildEPM.addElement(epm);

ConfigSpec configSpec = new EPMConfigSpecFilter(EPMDocConfigSpec.newEPMDocConfigSpec(), EPMFilters.NO_WORKING);

WTCollection buildedEPM = BuildHelper.buildFromCAD(buildEPM, configSpec, true);

 

 

PetrH

Announcements

Top Tags