hexagon logo

Change name of XML report

Hello,
In both PCDMIS 2018 and PCDMIS 2021.2 we are saving XML reports to a network file server and would like to force the filename to be the serial number of the part.
Is this possible?
Thanks!
z
Parents
  • We were using csv exports where we could change the filename to whatever we wanted now they are asking for xml outputs.

    I don't see a way to modify the name inside pcdmis without doing some vba scripting?  Anyone have any idea how this could be done or if it simply cannot be done?

  • Alternative method idea - (in theory this could be done in PC-Dmis without scripting but it gets tricky.)

    Using the .XML stats command as is; the file name is:

    "...a measurement routine named "Test.prg" executed on August 12, 2010 at exactly 2:40:15 PM local time, would have this file name: Test_Thursday_August-12-2010_14_40_15.XML"

    In a script, simply use the file scripting object to find the file (you can use a wild card) then copy to a new location with the name you want.

    It almost works in PC-Dmis (the File/EXISTS accept a wild card, but the FILE/COPY doesn't) quite easily.

     

    You could grab the File name, and the date and time (formatted appropriately) to generate the file name, then use FILE/COPY to move and rename it how you want, then delete the original.

    The only issue would be if the seconds (or minutes or hours) tick over between the command where the .xml file is generated and when you grab the system time.

Reply
  • Alternative method idea - (in theory this could be done in PC-Dmis without scripting but it gets tricky.)

    Using the .XML stats command as is; the file name is:

    "...a measurement routine named "Test.prg" executed on August 12, 2010 at exactly 2:40:15 PM local time, would have this file name: Test_Thursday_August-12-2010_14_40_15.XML"

    In a script, simply use the file scripting object to find the file (you can use a wild card) then copy to a new location with the name you want.

    It almost works in PC-Dmis (the File/EXISTS accept a wild card, but the FILE/COPY doesn't) quite easily.

     

    You could grab the File name, and the date and time (formatted appropriately) to generate the file name, then use FILE/COPY to move and rename it how you want, then delete the original.

    The only issue would be if the seconds (or minutes or hours) tick over between the command where the .xml file is generated and when you grab the system time.

Children
No Data