hexagon logo

Export to CSV - putting DEVs in seperate COLUMNS

Hi there, I've worked through the code underneath. However I need my results in a different format:































Measurment # DEV Point 1 DEV Point 2 DEV Point 3
1 xxx xxx xxx
2 xxx xxx xxx
3 xxx xxx xxx
3 xxx xxx xxx


Is there any way I can achieve this? Currently all my DEVs are in one row with ";" in between.

Thanks a lot,

Erwin

How-To: Output selected data to a CSV file - PC-DMIS User Forum
http://www.pcdmisforum.com/showthread.php?15054-How-To-Output-selected-data-to-a-CSV-file

Post your code samples here<br> For all versions of PC-DMIS

Parents
  • ... however it keeps overwriting the results and I want the results to end up in a table.. underneath each other.. any suggestions?

    IF/V1==0
    FPTR =DATEI/ÖFFNEN,Q:\Messtechnik\03_PROTOKOLLE\KMG\PORSCHE\J1\961_TiTo_Basis_vorne\20190430_PPE_mit Cubing\PPE.csv,[B][COLOR=#FF0000]SCHREIBEN[/COLOR][/B]
    DATEI/ZEILE_SCHREIB,FPTR,MessungNr;Merkmal 5;Merkmal 6;Merkmal 7;Merkmal 8;Merkmal 9;Merkmal 10;Merkmal 11;Merkmal 12;Merkmal 13
    DATEI/SCHLIESSEN,FPTR,BEIBEHALTEN
    END_IF/
    FPTR =DATEI/ÖFFNEN,Q:\MESSTECHNIK\03_PROTOKOLLE\KMG\PORSCHE\J1\961_TITO_BASIS_VORNE\20190430_PPE_MIT CUBING\PPE.CSV,[B][COLOR=#008080]ANHÄNGEN[/COLOR][/B]
    DATEI/ZEILE_SCHREIB,FPTR,PART+";"+LAGE5.T.DEV+";"+LAGE6.T.DEV+";"+LAGE7.T.DEV+";"+LAGE8.T.DEV+";"+LAGE9.T.DEV+";"+LAGE10.T.DEV+";"+LAGE11.T.DEV+";"+LAGE12.T.DEV+";"+LAGE13.T.DEV
    DATEI/SCHLIESSEN,FPTR,BEIBEHALTEN



    It does exactly what you tell it to - overWRITE the file when writing the header, then APPEND-ing the data line. It should rather be like (pseudo code):

    if not fileexist(your file name) then
      open the file in WRITE mode
      write header
      close file
    end if
    
    <do the measure>
    
    open the file in APPEND mode
    write the data
    close file
    
    
Reply
  • ... however it keeps overwriting the results and I want the results to end up in a table.. underneath each other.. any suggestions?

    IF/V1==0
    FPTR =DATEI/ÖFFNEN,Q:\Messtechnik\03_PROTOKOLLE\KMG\PORSCHE\J1\961_TiTo_Basis_vorne\20190430_PPE_mit Cubing\PPE.csv,[B][COLOR=#FF0000]SCHREIBEN[/COLOR][/B]
    DATEI/ZEILE_SCHREIB,FPTR,MessungNr;Merkmal 5;Merkmal 6;Merkmal 7;Merkmal 8;Merkmal 9;Merkmal 10;Merkmal 11;Merkmal 12;Merkmal 13
    DATEI/SCHLIESSEN,FPTR,BEIBEHALTEN
    END_IF/
    FPTR =DATEI/ÖFFNEN,Q:\MESSTECHNIK\03_PROTOKOLLE\KMG\PORSCHE\J1\961_TITO_BASIS_VORNE\20190430_PPE_MIT CUBING\PPE.CSV,[B][COLOR=#008080]ANHÄNGEN[/COLOR][/B]
    DATEI/ZEILE_SCHREIB,FPTR,PART+";"+LAGE5.T.DEV+";"+LAGE6.T.DEV+";"+LAGE7.T.DEV+";"+LAGE8.T.DEV+";"+LAGE9.T.DEV+";"+LAGE10.T.DEV+";"+LAGE11.T.DEV+";"+LAGE12.T.DEV+";"+LAGE13.T.DEV
    DATEI/SCHLIESSEN,FPTR,BEIBEHALTEN



    It does exactly what you tell it to - overWRITE the file when writing the header, then APPEND-ing the data line. It should rather be like (pseudo code):

    if not fileexist(your file name) then
      open the file in WRITE mode
      write header
      close file
    end if
    
    <do the measure>
    
    open the file in APPEND mode
    write the data
    close file
    
    
Children
No Data