7 Replies Latest reply on Feb 28, 2012 2:55 AM by Chao Gu

    Print task failure

    Chao Gu

      SolidWorks running and close when running Print task.
      Implementation of the print task failure, Error messege is "Failed to run SolidWorks macro."

       

      Standard print task plug-in is not to make any changes to the SolidWorks macro.

       

      SolidWorks 2010 SP4.0 (32/64)
      SolidWorks Enterprise PDM 2010 SP3.0/SP4.0 (32/64)
      Windows 7

        • Re: Print task failure
          Eric Borst

          I know this post is a bit old, but I'm having the same problem where a print task started in E-PDM fails after a number of drawings.

          Does anyone know why this happens and how to solve it?

           

          SW2011 x64

          E-PDM 2011

          Windows 7 64bit

            • Re: Print task failure
              Andries Koorzen

              Hi Eric / Gu.

               

              Some thoughts on this (my 2c):

               

              Please refer to the error log (in the EPDM administration tool) for more details to see if anything is logged there.

               

              Please run this task as an administrator on the EPDM system and see if it still fails. If it does, it might have to do with workflow permissions (check that the user running the task can indeed add files to the vault using this task, in the specified state) (eric I'm not sure what user you're running this as)

               

              Also, the macro could be failing because the machine on which it is supposed to run might not have an activated license of solidworks installed. If it does have solidworks on the destination machine, make sure that the output details are correct.

               

              Ask your VAR for help with the following (they might hate me for this lol) as a final check: open the print task. Go to files, click advanced scripting options (stay with me here, we're not going to edit anything) copy and paste whatever you see there inside a new macro inside solidworks, then run it by modifying the applicable parameters. This will give you good control over the output process and help you to see exactly where the macro fails. This entire process is essentially a macro which is run inside of SW, which opens a file (given a path from EPDM), then prints the file to a default / designated printer

               

              Post your results here for the rest to see / troubleshoot

                • Re: Print task failure
                  Eric Borst

                  Hi Andries,

                   

                  I've contacted my VAR already.

                  Part of the problem is that the fail happens after it's already printed several drawings, then just stops.

                  So the license is ok, the macro and workflow permissions must also be ok. I'm running as a CAD editor, on my own workstation.

                   

                  I'll see if I can find more about the macro.

                    • Re: Print task failure
                      Chao Gu

                      Hi Eric /Andries

                         

                       

                      SPR #
                      Sort ascending
                      Sort descending
                      Customer Description
                      Sort ascending
                      Sort descending
                      Customer Status
                      Sort ascending
                      Sort descending
                      Customer Comments
                      Version
                      Sort ascending
                      Sort descending
                      Keyword
                      Customer Impact
                      Sort ascending
                      Sort descending
                      Target Fix Date
                      Sort ascending
                      Sort descending
                      Record selected562246

                      Print task fails with 'E_FAIL. An unspecified error occured' if source filepath or filename contains unicode (non english) characters

                      Opennone noneEntPDM Tasks EntPDM Foreign LanguageMedium

                       

                      The SPR is still not fixed.

                        • Re: Print task failure
                          Andries Koorzen

                          Hi Gu Chao. the SPR above refers to the fact that the filename / path contains non english / unicode chars. Is this true in your case?

                           

                          Also -> If the print task fails after a certain number of files, does that then mean that it works with a smaller number of files?

                          Are you on 2011 / 2012? I'm a developer in my spare time

                           

                          In my experience (I stand corrected), it is possible for a task to fail if the intent of the macro is to print 1 file at a time and not multiple files. It could be that the way in which it loads the files (and then does not unload), it simply overloads the target system.

                          Therefore the question: are you on 2011 / 2012.

                           

                          Unfortunately 'unspecified error' can really mean anything..! So then the question would be, is this the exact error you're getting?

                           

                          *

                            • Re: Print task failure
                              Eric Borst

                              In my case there are no strange characters.

                              I've now tried the exact same print action on my colleague's workstation, that runs on XP64 (mine W7 64), both same SW2011 and EPDM. His did not fail, just printed everything.

                               

                              And yes,

                              Error message: Failed to run SolidWorks macro.

                              Error code: E_FAIL, 'An unspecified error occurred.'

                               

                              Part of the problem is that it fails without producing an error log, so it is difficult to trace.

                              • Re: Print task failure
                                Chao Gu

                                Hi Andries

                                      Yes,This is true in my case. Please see SR 1-1367918721

                                     The problem is still,on 2011 / 2012.