hexagon logo

CMM report with TXT format

Hello all

Right now our CMM reports are all RTF format, can we export to a txt file automatically ?

Thank you

Parents
  • Yes you can. File > Printing > Report Window Setup. Or if you are using an print command in your program, just F9 that print command. You'll see a window like in the image below. Select the TXT format option. If you are doing an in-line variable command for a file path, you can just change your format there as well instead of being .xlsx or .pdf to .txt

Reply
  • Yes you can. File > Printing > Report Window Setup. Or if you are using an print command in your program, just F9 that print command. You'll see a window like in the image below. Select the TXT format option. If you are doing an in-line variable command for a file path, you can just change your format there as well instead of being .xlsx or .pdf to .txt

Children
  • Thank you.  My is 2015.1, it looks a little different.

  • you will need a newer version to get the TXT option.

  • You can always change the programs default template to be plain text if you are wanting a plain text report. Instead of trying to save as a .txt?

  • that doesn't effect the printing of the data.  If you only have PDF & RTF, you get PDF or RTF, no <filename>.TXT file

  • I did not think about the extension, sorry about that guys. Could he theoretically let it save that way, then resave it as a .txt with a script? Or would that not re-save correctly from rtf to txt? I am not familiar with how these formats differ.

  • RTF is formatted text, with colors and bunches of stuff.  You could open them with WORD and save as TEXT, after you remove all the color formats.

    THIS is what RTF looks like opened with notepad or wordpad (plain text editors)

    {\rtf1\ansi\deff0\deflang1033{\fonttbl{\f0\fmodern Courier New;}}
    {\colortbl\red0\green0\blue255;\red41\green163\blue35;\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue128;\red205\green205\blue205;\red48\green56\blue13;\red29\green114\blue24;\red255\green255\blue255;}
    {\stylesheet{\s0\sbasedon222;}{\s1\sbasedon222\b;}{\s2\sbasedon222\ul;}{\s3\sbasedon222\b\ul;}}
    \f0\cb5\cf0\fs18\margl360\margr360\margt360\margb720\paperw12240\paperh15840\psz1 \uc2
    {\s0 \cf4 PART NAME  : BALLAST-TRAY\par
    REV NUMBER : \par
    SER NUMBER : \par
    STATS COUNT : 1\par
     \par

  • Oh wow, I never really used rtf so I had no idea. That exactly the .css type of code you'd see in the backend for web building. Since it says stylesheet in there, and uses similar formatting. So it's probably html based too or something. Well that sucks. I know there is software that can convert .pdf's into other formats. Is there any way to script older version of pc-dmis to save as .txt or is the framework for that capability just not there?

  • it might predate HTML, it is what Pcdmis came out with for reporting (not their coding, just the stuff they used that someone else developed, in 1987, obsolete in 2008), pretty sure just that without PDF option in the beginning.

    You can open them in WORD, change it all to black text, then save-as plain txt, but that's a pain if you have to do more than a few.

    I doubt there is any way to script it, Pcdmis just didn't have the output options.  RTF, then RTF & PDF, then RTF, PDF, & Excel (CVS or whatever).  Then, once 'text' files were basically a thing of the past, they added that option.

  • Hey Matt, I found a really old program of ours. It is apparently from 2008. It was in a folder named PC-DMIS v37MR3 or something like that. This is apparently how they printed it back then. Reminds me of C#'s method of Console.WriteLine. Is this a viable method? Or is this too messy and time consuming? There is tons of lines of this same type of code that goes for like 300 lines.

                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,PROMPT,AUTO OPEN=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL=OFF,$
                  PREVIOUS_RUNS=DELETE_INSTANCES
    $$ NO,
                ........................................................................
                ASCII TEXT OUTPUT FOR EXCEL...
                ........................................................................
                DISPLAYPRECISION/5
    FPTR       =FILE/OPEN,C:\TEMP\FILE.TXT,WRITE
    $$ NO,
                ......................
                FILE/WRITELINE,FPTR,D1.X.MEAS
                FILE/WRITELINE,FPTR,D1.Y.MEAS
                FILE/WRITELINE,FPTR,D1.D.MEAS
                FILE/WRITELINE,FPTR,D1.RN.MEAS
    $$ NO,
                ......................
                FILE/WRITELINE,FPTR,D2.M.MEAS
                FILE/WRITELINE,FPTR,D3.Z.MEAS
    $$ NO,
                ......................
                FILE/WRITELINE,FPTR,D4.PR.MEAS
                FILE/WRITELINE,FPTR,D4.PA.MEAS
                FILE/WRITELINE,FPTR,D4.D.MEAS
                FILE/WRITELINE,FPTR,D4.RN.MEAS
    $$ NO,
                ......................
                FILE/WRITELINE,FPTR,D5.PR.MEAS
                FILE/WRITELINE,FPTR,D5.PA.MEAS
                FILE/WRITELINE,FPTR,D5.D.MEAS
                FILE/WRITELINE,FPTR,D5.RN.MEAS
    $$ NO,
                ......................
                FILE/CLOSE,FPTR,KEEP

  • I'm wondering how long this takes to program with more than 1000 positions ^^