hexagon logo

Report file path keeps changing

I have the exact file path/folder I want selected in the print output for all of my programs, but it keeps changing on me. It seems to always default to the location of the previous program I ran, and I have to manually select the correct output folder each time I print the report. The filename and the index number, however, are always correct. It's just the destination that keeps changing. It does not change if I keep the same program open and run it multiple times. It only changes when I close the current program and open a new one. Does anyone else have this issue? I have a network drive selected as the output destination. Does that have anything to do with it?
Parents
  • If it's prompting you to select a location, this usually means it can't access the location or the location does not exist. Some of your variable assignments look incorrect, but I'm not sure if that's just a post error or an error in the actual program. Like the single quote in your PDF_PATH variable and REPDATETIMEORDER is missing a + before DATE.

    To troubleshoot, place an operator comment before the print command and point it to the variable FILENAME. This should display the full path and pdf name so you can check if the path is correct. To check access, simply save as the program to one of those folders.

    Also, do you have scripts earlier in the program that creates those folders or you create them manually before running the program? Looking at your variables, you would have to create this folder before running:
    J:\PROTOKOLLS\CUSTOMER\DFS3206\​
Reply
  • If it's prompting you to select a location, this usually means it can't access the location or the location does not exist. Some of your variable assignments look incorrect, but I'm not sure if that's just a post error or an error in the actual program. Like the single quote in your PDF_PATH variable and REPDATETIMEORDER is missing a + before DATE.

    To troubleshoot, place an operator comment before the print command and point it to the variable FILENAME. This should display the full path and pdf name so you can check if the path is correct. To check access, simply save as the program to one of those folders.

    Also, do you have scripts earlier in the program that creates those folders or you create them manually before running the program? Looking at your variables, you would have to create this folder before running:
    J:\PROTOKOLLS\CUSTOMER\DFS3206\​
Children
  • I think you're looking at Mykel's post above because I did not post any code. But you're saying that it should not prompt me to select a location if everything is correct ? Because it always does. On two different CMMs actually, so two completely different installs. Different versions even.
  • Hello.
    Sora5, yes it was a comment to the "wrong" guy.
    Normally everything works fine. But I do experience that I get a promt, and it might very well be a lost network-connection, or a slow connection.
    Yes a + is missing. Well spotted, In the program the + is there, and have alway been.

    Nice tip, with the prompt before continuing.

    No, I have no script that creates the directory.
    I choose to do this mannualy, because I have instructions ande other stuff, that comes with the programs.
    It's all part of a mental checklist.
    And you are right abot the path. That's the one and it that directory the report with the filename PART_DFS3206_2023-11-29_13-30.PDF will be created.