Skip to main content
Arena Solutions Logo
      • Community
      • Recently active topics
      • Unanswered questions
      • Community
          • PTC Community Announcements78
          • PTC Community Feedback281
          • Welcome & How-To's39
          • PTC eSupport Help Discussions447
          • PTC eSupport Help Ideas62
          • PTC University Training339
          • PTC University LEARN Questions100
          • Expert Session Recording Library1
          • PTC/USER801
          • PTCooler "OffTopic"697
          • Codebeamer393
          • Systems/Software Engineering2252
          • Vuforia Chalk237
          • Vuforia Studio3034
          • Vuforia Studio and Chalk Tech Tips99
          • Vuforia Expert Capture264
          • 3D Part & Assembly Design21573
          • Analysis2144
          • Customization3156
          • Manufacturing (CAM)1107
          • System Administration4987
          • Creo Parametric Tips443
          • Drafting282
          • Modeling293
          • Model Manager18
          • System Administration81
          • Other Creo Products (View/Sketch/Illustrate/Layout/ Schematics and Creo Direct)1171
          • Mfg Solutions & Apps569
          • IoT & Connectivity Tips1071
          • Kepware959
          • ThingWorx14949
          • Ask the Experts About the Licensing App12
          • Windchill16084
          • Windchill Customization2652
          • Windchill Navigate353
          • Windchill Tips96
          • Arbortext3755
          • Mathcad14743
          • Mathcad Installation1388
          • Mathcad Tips70
          • Ask Me Anything About Mathcad5
          • PTC Education Forum4099
          • PTC "Working Group" Info8
          • Creo (Previous to May 2018)5673
          • Integrity Lifecycle Manager New Web UI25
          • B&WSoftware - The Creo/Toolkit Experts58
          • Model Based Enterprise14
          • Community Content Groups52
          • Innovation Lab2
          • IoT Archive27
  • Events
  • Groups
Arena Solutions Logo
  • Create topic
  • Login
  • Home
  • Community
  • Community
  • PLM
  • Windchill Customization
  • WVS: Afterloader hook method to rename files generated by CAD Worker from client side viewables?
C
CarTorn926301-Visitor
1-Visitor
Forum|Forum|7 years ago
August 28, 2018
Question

WVS: Afterloader hook method to rename files generated by CAD Worker from client side viewables?

  • Forum|Forum|7 years ago
    August 28, 2018
  • 1 reply
  • 3453 views

For our Windchill Visualization Services, we are using Afterloader (AfterEDRloader3) hook method to rename visualization files to PartNumber_Revision based on attribute values.

 

This method is identified in: Article - CS252900 - Windchill PDMLink: An example Afterloader hook method to add the attribute value from the viewable files to the name of output Additional File Types

 

This works very well for EPM Docs pushed from Commonspace and message ""AfterEDRloader starts: Checking if object is EPMDoc: appears in WVS Job Monitor log file when method completes.

 

Now we want to leverage client side preprocessing of visualization files per: Article - CS21380 - How to edit Client-side Recipe configuration used by Creo Parametric and the Workgroup Manager clients during Windchill Custom Check-in of "Models and Viewables"

 

However, the Afterloader hook method fails to rename the visualization files when sent to WVS CAD Worker and message "AfterEDRloader: Return Code - Bypass" appears in WVS Job Monitor log file when method is called.

 

How do we get the AfterEDRloader method to also rename visualization files generated by CAD Worker from client side viewables?

 

 

 

 
  • EPM

1 reply

T
23-Emerald IV
TomU23-Emerald IV
23-Emerald IV
Forum|Forum|7 years ago
August 28, 2018

That message is coming right out of the AfterEDRloader3.java file:

// getPropertyStringValue
String subdirectory = getTransferDir(edFileName);
File pvs = new File(subdirectory, edFileName);
if (pvs == null || !pvs.exists()) {
	ret[0] = "AfterEDRloader: Return Code - Bypass";
	return ret;
}

You'd have to add some extra debugging lines to be sure but I'm guessing something is different with the bundle of files based on how the representation is being created.  (From CS66824, "When the CAD Document is then published by WVS, the pre-converted viewables in the attached PVZ are used to create the Representation content, instead of publishing using a server-side CAD worker.")

 

More than likely edFileName (in the previous section) is never getting set:

// get the ed file Name for this representation
String edFileName = null;
Representation ch = (Representation)ContentHelper.service.getContents(rep);
appDatas = ContentHelper.getContentList(ch);
int num_of_files = appDatas.size();

for (int i = 0; i < appDatas.size(); i++) {
	appData = (ApplicationData)appDatas.get(i);
	if (appData.getRole() != null && appData.getRole().equals(ContentRoleType.PRODUCT_VIEW_ED)) {
		edFileName = appData.getFileName();
		break;
	}
}

 

I'm actually curious why you would want to switch to this method of viewable generation?  There are an awful lot of disadvantages.  (Again, see CS66824.)  If it's due to worker availability when publishing very large assemblies, there are ways around this where you can direct very large assemblies to certain cad workers and everything else to other workers.

C
CarTorn926301-VisitorAuthor
1-Visitor
Forum|Forum|7 years ago
September 5, 2018

Thanks, Tom.

One of our engineers found the issue and corrected it.

We are not switching to this method, merely lookign at using it to augment our existing WVS CAD Worker capabilities.

Our existing WVS utilizes dedicated CAD Workers for multi-language pdf, step, pvz and dwg generation.

This works well enough; however, in our time sliced VM environment we had release drawing pdf's that would consistently take 10-20 minutes or even up to an hour to generate a pdf.

With considerable performance tuning I was able to reduce this 25-40%; however, this was still not a good solution as it did not scale very well. For example, reducing the time from 20 mins to 12 mins looked good in powerpoint. However, in production I might have 10 of these 12 minutes jobs ahead of mine, so incrementally faster CAD Workers wasn't a very useful solution.

The beauty of client side viewables is that most of the processing occurs locally and the CAD Workers are only used to convert the attached client side viewable and bring it back into windchill as a viewable.

The conversion of client side viewable to release drawing pdf by CAD Worker is staying pretty consistent at 5 seconds no matter how many files in the source file or how many drawing sheets are generated.

To me, this is much more acceptable and very scalable and with a couple of our clever engineers figuring out how to rename the pdf to partnumber_revision witth AfterEDRloader3 prior to passing it back to Windchill, this may be automated performance we have been looking for.

 

G
G_U11-Garnet
11-Garnet
Forum|Forum|5 years ago
March 28, 2021

HI, 

 

I also tried the article CS252900 but not working for me i deployed as it is the customization. and added two-property -


xconfmanager -s publish.afterloadermethod="com.ptc.wvs.util.AfterEDRloader3/renameAdditionalfiles" -t codebase/WEB-INF/conf/wvs.properties -p

 

xconfmanager -s

publish.afterloadermethod.propertyincludelist="epmdoc_Number,epmdoc_iterationDisplayIdentifier" -t codebase/WEB-INF/conf/wvs.properties -p

 

and tried to republish the one drawing but still pdf name is filename+Version.pdf.

 

Anyone, please help us.

Thanks, 

Gourav Upadhyay

Powered by Gainsight
Terms & ConditionsAccessibility statement

Sign up

Already have an account? Login

Please use your PTC eSupport account.

Login

Welcome to the PTC Community

Please use your PTC eSupport account.

Login

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

Back to overview

Scanning file for viruses.

Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.

OK

This file cannot be downloaded

Sorry, our virus scanner detected that this file isn't safe to download.

OK