hexagon logo

Autoname and save file as .pdf

Longtime reader, first-time poster. Thanks to all for the help this forum has provided to me thus far.

I am new to PCDMIS, but an experienced programmer with GeoMeasure (MTI). GeoMeasure is a DMIS language, but vastly different from PCDMIS. I have programmed (10 years) and even taught programming at a local community college (2 yrs). I was away from CMM's for a couple years until I moved to MA from MI last year and took this job, where I first encountered the Demon.

So now that you all have a little background info on me, here is the problem that searching the forum archives has failed to find a solution to.

I had a fixture fabricated that holds up to 16 parts in a 4X4 configuration. I took an existing program that measures a couple hundred points for flatness and created a nested loop to get my vertical and horizontal offsets. I can execute the program without a problem and everything runs fine except for one minor issue: the report needs to print out with a custom report name for each part before the loop completes.

I found a few threads that address using variables to assign the printpath to and then insert the variable into the print command. What I end up with when running is a prompt to save the file (I am not using the print setup from the "file>printing>edit print window setup" dialog box; all of those options are left unchecked). I think the problem may be network related because when I change the file location to the local C: drive, it works flawlessly.

I have attached the program for reference and I appreciate any and all comments that may be helpful.

Also, I am working a 12:30pm to midnight shift and 7:00am-noon on Saturdays, so outside of those hours I may be a bit unresponsive.
Parents
  • Like J said, use the doublewhacks in the path and add an extra \ in the beginning:

    ASSIGN/PRINTPATH = 
    "\\\Lyt-srv-2\qual\New Insprpt\CMM - BROWN AND SHARPE\CMM Data\BLEED VALVE DATA\378A47 Flatness" + "\378A47 REV D FLATNESS " + SO + "-" + V1 + ".PDF"


    If it still would prompt you to hit save, then try to put the concatenation directly in the 'APPEND=' part instead of putting the finished path in a variable and then passing the variable as printpath to the print command.

    I did not try the concatenated path -> variable -> printcommand, but I did try the "\\\server\folder\folder\filename.pdf " directly in the printcommand, so it works (at least in 2009MR1).

    Note: If you leave the doublewhacks (") out, it will prompt you to hit SAVE.
Reply
  • Like J said, use the doublewhacks in the path and add an extra \ in the beginning:

    ASSIGN/PRINTPATH = 
    "\\\Lyt-srv-2\qual\New Insprpt\CMM - BROWN AND SHARPE\CMM Data\BLEED VALVE DATA\378A47 Flatness" + "\378A47 REV D FLATNESS " + SO + "-" + V1 + ".PDF"


    If it still would prompt you to hit save, then try to put the concatenation directly in the 'APPEND=' part instead of putting the finished path in a variable and then passing the variable as printpath to the print command.

    I did not try the concatenated path -> variable -> printcommand, but I did try the "\\\server\folder\folder\filename.pdf " directly in the printcommand, so it works (at least in 2009MR1).

    Note: If you leave the doublewhacks (") out, it will prompt you to hit SAVE.
Children
No Data