Cancel
Showing results for 
Search instead for 
Did you mean: 

NX to PDF translation not working using the previewservice translator

Siemens Creator Siemens Creator
Siemens Creator

Hello Guys, 

 

This client has this problem were they can't use the previewervice to translate NX parts to PDF. They  get this error message on dispatcher:

 

2018-08-28 15:17:54,157 ERROR - Cannot find task preparation class specified by service configuration for SIEMENS previewservice (null)

java.lang.ClassNotFoundException: Property Translator.SIEMENS.previewservice.Prepare or TranslatorMode.SIEMENS.previewservice.Prepare not available.

 

They already follo wed the correct steps to installing this translator, but the error still shows up. They already updated the following files:

 

- translator.xml

- service.properties 

- Set up the corresponding preferences 

- previewservice.bat

 

I'm thinking they are missing som java class. However, I looked into the jar files and found our the TaskPrep class in in the DCTransSvcs.jar file, which they also confirmed they have it. Any ideas what miught me causing this error?

 

Thanks for the help!

13 REPLIES 13

Re: NX to PDF translation not working using the previewservice translator

Siemens Creator Siemens Creator
Siemens Creator

Any reason you are not using nxtocgmdirect to translate NX to PDF?

Do any translators work?

Re: NX to PDF translation not working using the previewservice translator

Siemens Creator Siemens Creator
Siemens Creator

Turns our the client had copy pasted the lines:

 

Translator.SIEMENS.previewservice.Prepare=com.teamcenter.ets.translator.ugs.basic.TaskPrep

Translator.SIEMENS.previewservice.Load=com.teamcenter.ets.translator.ugs.basic.DatabaseOperation

 

In the service.properties file. After I rewrited them manually we got past that error. Thanks for the help!

Re: NX to PDF translation not working using the previewservice translator

Pioneer
Pioneer

Hi,

 

Can you please help me with a documents or steps on how NX to PDF was handled via PreviewService? I already have it running over NXtoCGMDirect but I need to make use of watermarks defined in Previewservice already.

Re: NX to PDF translation not working using the previewservice translator

Solution Partner Esteemed Contributor Solution Partner Esteemed Contributor
Solution Partner Esteemed Contributor

Basic procedure:

  1. Install Teamcenter Visualization with "Convert and Print" feature.
  2. Install Ghostscript (you can download it from GTAC)
  3. Install the PreviewService translator through TEM. Make sure to point to the standalone vis installation location where you installed convert and print.
  4. Add the following site preferences:
    1. SIEMENSpreviewservice_translation_service_name=SIEMENS.previewservice
    2. ETS.DATASETTYPES.SIEMENS.PREVIEWSERVICE=UGPART
    3. ETS.PRIORITY.SIEMENS.PREVIEWSERVICE=2
    4. ETS.TRANSLATOR_ARGS.SIEMENS. PREVIEWSERVICE=<no value set>
    5. SIEMENSpreviewservice_UGPART_ets_dst_ds_type=PDF
    6. SIEMENSpreviewservice_UGPART_ets_dst_nr_type=PDF_Reference
    7. SIEMENSpreviewservice_UGPART_ets_dst_relation_to_src=false
    8. SIEMENSpreviewservice_UGPART_ets_dst_relation_type=IMAN_manifestation
    9. SIEMENSpreviewservice_UGPART_ets_nr_types=UGPART
    10. SIEMENSpreviewservice_ets_ds_types=UGPART
    11. SIEMENSpreviewservice_on_demand_generate_vis_data_priority=3
  5. Ensure that ETS.TRANSLATORS.SIEMENS lists previewservice (or add it).
  6. Insert the following two lines at the bottom of Service.properties:
    1. Translator.SIEMENS.previewservice.Prepare=com.teamcenter.ets.translator.ugs.basic.TaskPrep
    2. Translator.SIEMENS.previewservice.Load=com.teamcenter.ets.translator.ugs.basic.DatabaseOperation
  7. In TC_VIS\VVCP\vvcp.ini, set the PsPath to the Ghostscript location
  8. In previewservice translator section of translator.xml, set "OUTPUT_TYPE=TIF" and "SIZE=auto".

 

Now select the UGPart dataset and submit for transaction. It should create a PDF file and attach to the item revision.

 

Via previewservice you may need to change vvcp.ini for the UGII_CGM_RASTER_ELEMENT setting to be rle_cell. After resaving the drawing in NX then running the drawing through previewservice it converts the images correctly. This is not done during the save action in NXManager but through a workflow handler using TSTK-CreateTranslationRequest.


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: NX to PDF translation not working using the previewservice translator

Pioneer
Pioneer

Hi Randy,

 

Main: Just after posting that, I got it to work. I was earlier using NXtoCGMDirect and was not able to get watermarks on the drawing PDF. I just tried using NXtoPDF and it created the Watermarked PDF (006593_00_00-001.pdf) in the staging folder but attached a nonwatermarked PDF (006593_00_00.pdf) to teamcenter. 006593_00_00-001.pdf remains in the staging folder. How do I get it attached to the dataset instead of 006593_00_00.pdf?

Re: NX to PDF translation not working using the previewservice translator

Solution Partner Esteemed Contributor Solution Partner Esteemed Contributor
Solution Partner Esteemed Contributor
I have no idea.

The stamp placement may be related to drawing size? You may need to have size specific MDS.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: NX to PDF translation not working using the previewservice translator

Pioneer
Pioneer

Hi Randy,

 

I figured out the stamp placement. I am struck aty below part 

 

' just tried using NXtoPDF and it created the Watermarked PDF (006593_00_00-001.pdf) in the staging folder but attached a nonwatermarked PDF (006593_00_00.pdf) to teamcenter. 006593_00_00-001.pdf remains in the staging folder. How do I get it attached to the dataset instead of 006593_00_00.pdf?'

 

I spoke to GTAC and they are asking me to get a developer to fix it :(

Re: NX to PDF translation not working using the previewservice translator

Siemens Creator Siemens Creator
Siemens Creator

Have you looked into using the System Stamp Configuration capabilities that are part of Document Management?  You could use nxtocgmdirect to generate the PDF and then use the doc mgmt stuff to stamp it.  Using the doc mgmt stuff, you dont have to worry about any preferences for the dispatcher or anything like that.

Re: NX to PDF translation not working using the previewservice translator

Pioneer
Pioneer

Hi Fisher,

 

I do not want to look at DocMgmt right now as it'll complicate things. Right now we just need basic stuff like released to Production/Date/User printed on the drawing. So if I can figure out how to get the post processed dataset attached in TC, im good.