Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I have set up the AfterEDRloader according to CS216668.
Everything is working fine. My pdf is shown as an attachment.
But I want to add the lifecycle state in the filename. This should not be that hard to do?
I guess I just need to modify the AfterEDRloader.java file but I dont know how exactly.
Anyone with experience of the AfterEDRloader method?
Solved! Go to Solution.
You can add it e.g. in the method renameAdditionalfiles
if (fileExt.equals("zip"))
{
sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + "_" + postfix;
} else {
sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + cadDoc.getLifeCycleState().getDisplay(Locale.US) + "." + fileExt;
}
You can add it e.g. in the method renameAdditionalfiles
if (fileExt.equals("zip"))
{
sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + "_" + postfix;
} else {
sFileName = sFileName.substring(0, sFileName.lastIndexOf(".")) + "_" + iterationInfo + cadDoc.getLifeCycleState().getDisplay(Locale.US) + "." + fileExt;
}
Thanks!
Yes, thats kind of how I solved the problem, I added:
String StateInfo = ((EPMDocument)ch).getLifeCycleState().toString();
and
String StateInfo = cadDoc.getLifeCycleState().toString();
and then called + StateInfo + for sFileName.
Now my problem is that the "publisher" will not publish the file under attachment when the state is changed. In my case when a drw is released.
even though I have set: publish.republishonepmdocumentchange=true
The file is not being published as attachment. The step or dxf will be included in the representation itself. You need to set the preference to ALL or the appropreate value to download the secondary files.
Problem solved when I changed "publish.promote.restrict" from "ARBORTEXT" to "ARBORTEXT PROE"