[Co...] Posted September 10 Share Posted September 10 Hi all, I wanted to know if anyone has a solution for a problem I am seeing. Example: We run parts and have the PDF Files setup to autosave at the completion of a run. Say I run "Part A_Run 1" and it fails. I modify it and need to run it again, it should be "Part A_Run 2" and if so, everything works fine. What is happening is that operators aren't remembering to correctly rename the Run number so the might run another "Part A_Run 1" and it overwrites the file in the directory we have it going to without asking something like "Are you sure you want to save over this?" or "There is already something named this...blah blah" Is there a way to prevent file over-writes so that we don't have this happen? Lost a few files today because of this issue and I don't have an easy fix for it without telling the operators you really need to pay attention to the Run number to ensure you aren't repeating something already in the folder. Thanks Link to comment Share on other sites More sharing options...
[Th...] Posted September 10 Share Posted September 10 (edited) I would set up variable file naming and probably use getRecHdForFil("time") to add a timestamp to the file name. That way it should be unique even if the same run number is used. Edited September 10 Changed PCM command to file-safe one 3 Link to comment Share on other sites More sharing options...
[Lu...] Posted September 10 Share Posted September 10 I second Thomas's suggestion. If you need any information on setting up the name for your output files, take a look at this KB article: https://portal.zeiss.com/knowledge-base?id=587888 Link to comment Share on other sites More sharing options...
[Co...] Posted September 10 Author Share Posted September 10 Please sign in to view this quote. Love that idea! It won't change the inputs the operator has to make but will add a timestamp to the file whenever it is saved to prevent the overwrite issue I am seeing. Thank you for this! Link to comment Share on other sites More sharing options...
[Ri...] Posted 8 hours ago Share Posted 8 hours ago The following creates a file name that will never overwrite. It appends a Date and Time to each file name. "<Some Drive letter>:\CMM Data Files\Table Files"+"\"+getRecordHead("drawingno")+"\"+getRecordHead("order")+"\"+getRecordHead("dmesn")+"\"+getRecordHead("planid")+"_"+getRecordHead("partnbinc")+"_"+getRecordHead("date")+"_"+getRecordHead("time")+"_"+"hdr.txt" The above also nests data in a set of Folders for traceability. drawingno = Part Number order = Our Job Number dmesn = CMM the part was run on partnbinc = Part Counter (We use this as a counter and or Serial Number) date = Current Date at time of file creation time = Current time at file creation Example file name: <Some Part Number>_B_Targetting_RDS_05-11-20261_SC-028_2026-8-31_2_05_36 PM_.pdf Program Name Serial Number or Part Counter Creation Date Actual Time (2:05:36 PM) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in