3 Replies Latest reply on Apr 30, 2018 2:37 PM by Ctm Pdm Admin

    Output file name does not accept data card variables in Convert Task Add-in (ver. 2018010065)

    Ctm Pdm Admin

      Hi all,

       

      I can't figure out how this convert task add-in works. In the 2018 version it claims that you can use data card variables in the output file name/path, but I can't get it to work for Parasolid files.

       

      When I add a data card variable in the file name it fails to save the converted file and creates an error file saying:

       

      "Method call ModelDocExtension::SaveAs for document 'C:\PDM_Vault\Projects\1305 LATERAL RETRACTOR\PDFs_Parasolids\1305-0003_01_%Revision%.x_t' and configuration '1305-0003' failed. Error code 1 returned."

       

      %Revision% in this case is a data card variable.

       

       

      The weird thing is that when I change the output file format to "STL" or "PDF", for example, then it works. (same out of the box script). I don't see any place in the convert script itself that relates to the data card variables so it must be something outside the convert script that is not working.

       

      Has anyone else had this problem? is this a known issue? I couldn't find anything related to this in the KB.

       

      I appreciate if someone else can try to recreate this problem for Parasolid (x_t) conversion and let me know here so I can open an SR.

        • Re: Output file name does not accept data card variables in Convert Task Add-in (ver. 2018010065)
          Martien Mourits

          Hi there, I just tried it without any problems with a default convert task in a default vault, converting to parasolid with a revision number in the destination filename.

          When searching the KB for "error code 1 returned", I got an SPR describing similar behaviour for exporting to pdf, see SPR 589554. It mentions KB solution S-053733 for a workaround. This should be fixed previously in 2012. Could it be a script of that age? Don't know if that's at all possible...

          The other options the article mentions are looking for a file with the same name in the destination location. Be sure to also look in the 'recycle bin' and destroy previously generated files with the same name.

            • Re: Output file name does not accept data card variables in Convert Task Add-in (ver. 2018010065)
              Ctm Pdm Admin

              Martien,

               

              Thank you for the reply.

               

              Did you use "Source File Revision" or did you use a variable from the data card in your output path?

               

              To clarify,  this works:

               

              This Does Not:

               

              Again, if I change to any other file format "STL", "PDF", "STEP" or "IGS" they all work with no problem with the exact same setting and default script. It is just Parasolid that does not work and I can't figure out what is special about Parasolid.

               

              I also tried the S-053733 solution and that didn't help. because files are named "%Part Number%_%Revision%" when the conversion is happening and the add-in code (not the script) replaces those with data card variables after the script is run and checks them in.

               

              I'm using all the out of the box add-in settings and scripts in a freshly installed 2018 PDM environemnt.