4 Replies Latest reply on Dec 18, 2017 12:15 PM by Ulf Stockburger

    Pack and Go API bug?

    Josh Brady

      Hey coding-type folks, I wonder if I could get some assistance testing an API bug.

       

      According to my VAR, ye support folks at SW are unable to reproduce this issue.  Would you mind trying this out to see if it works correctly in other versions?  Or even with your files vs. mine...

       

      I'm running 2017 sp5. 

       

      The issue is that the Pack and Go API call SavePackAndGo does not correctly report the number of documents actually copied.  If I understand correctly, it's supposed to return an array with a status code of each document copy action.  If any of the target documents already exist, the copy fails for those documents and the array entry should be "2".  The API call seems to fail to actually increment its internal counter for failures, so the number of return results is less than the number of documents to copy.

       

      The attached zip file contains an assembly, part files, and a macro.  The macro performs a Pack and Go on the active assembly (can be any assembly, doesn't have to be mine) and puts the result into a subfolder "PNGto" in the same folder as the macro.

       

      To recreate the issue:

      1. Open an assembly

      2. Run the macro (it will report result with a message box)

      3. Open the subfolder that was created by the Pack and Go and delete a few files, but leave some there.

      4. Run the macro again. On my machine, with all of my files, the number of reported results is different from the number of attempted copies.

       

      If you get a spare minute, let me know if yours does the same... and/or feel free to figure out what I screwed up in my code to make it behave like this!