File/Writeline Question......

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File/Writeline Question......

    I'm trying to get this to work..... But when I try and go the other way across it doesn't report the numbers just the text.... Does anyone know how to get this to work... Example 2 is the one I'm talking about....







    Example1

    FPTR =FILE/OPEN,C:\APPS\DATA.txt,WRITE
    FILE/WRITELINE,FPTR,LOC2.Z.MEAS
    FILE/WRITELINE,FPTR,LOC4.Z.MEAS
    FILE/WRITELINE,FPTR,LOC6.Z.MEAS
    FILE/WRITELINE,FPTR,LOC8.Z.MEAS
    FILE/WRITELINE,FPTR,LOC10.Z.MEAS
    FILE/WRITELINE,FPTR,LOC12.Z.MEAS
    FILE/WRITELINE,FPTR,LOC14.Z.MEAS
    FILE/WRITELINE,FPTR,LOC16.Z.MEAS
    FILE/WRITELINE,FPTR,LOC18.Z.MEAS
    FILE/WRITELINE,FPTR,LOC20.Z.MEAS
    FILE/WRITELINE,FPTR,LOC22.Z.MEAS
    FILE/WRITELINE,FPTR,LOC24.Z.MEAS
    FILE/WRITELINE,FPTR,LOC26.Z.MEAS
    FILE/WRITELINE,FPTR,LOC28.Z.MEAS
    FILE/WRITELINE,FPTR,LOC30.Z.MEAS
    FILE/WRITELINE,FPTR,LOC32.Z.MEAS
    FILE/WRITELINE,FPTR,FLAT1.M.MEAS
    FILE/WRITELINE,FPTR,LOC33.PR.MEAS
    FILE/WRITELINE,FPTR,LOC34.PR.MEAS
    FILE/WRITELINE,FPTR,LOC35.PR.MEAS
    FILE/WRITELINE,FPTR,LOC36.PR.MEAS
    FILE/WRITELINE,FPTR,LOC37.PR.MEAS
    FILE/WRITELINE,FPTR,LOC38.PR.MEAS
    FILE/WRITELINE,FPTR,LOC39.PR.MEAS
    FILE/WRITELINE,FPTR,LOC40.PR.MEAS
    FILE/WRITELINE,FPTR,LOC41.PR.MEAS
    FILE/WRITELINE,FPTR,LOC42.PR.MEAS
    FILE/WRITELINE,FPTR,LOC43.PR.MEAS
    FILE/WRITELINE,FPTR,LOC44.PR.MEAS
    FILE/WRITELINE,FPTR,LOC45.PR.MEAS
    FILE/WRITELINE,FPTR,LOC46.PR.MEAS
    FILE/WRITELINE,FPTR,LOC47.PR.MEAS
    FILE/WRITELINE,FPTR,LOC48.PR.MEAS
    FILE/WRITELINE,FPTR,DIST2.M.MEAS
    FILE/WRITELINE,FPTR,DIST3.M.MEAS
    FILE/WRITELINE,FPTR,DIST4.M.MEAS
    FILE/WRITELINE,FPTR,DIST1.M.MEAS
    FILE/WRITELINE,FPTR,DIST5.M.MEAS
    FILE/WRITELINE,FPTR,DIST6.M.MEAS
    FILE/WRITELINE,FPTR,DIST7.M.MEAS
    FILE/WRITELINE,FPTR,DIST8.M.MEAS
    FILE/WRITELINE,FPTR,LOC49.PR.MEAS
    FILE/WRITELINE,FPTR,LOC50.PR.MEAS
    FILE/WRITELINE,FPTR,LOC51.PR.MEAS
    FILE/WRITELINE,FPTR,LOC52.PR.MEAS
    FILE/WRITELINE,FPTR,LOC53.PR.MEAS
    FILE/WRITELINE,FPTR,LOC54.PR.MEAS
    FILE/WRITELINE,FPTR,LOC55.PR.MEAS
    FILE/WRITELINE,FPTR,LOC56.PR.MEAS
    FILE/WRITELINE,FPTR,LOC57.PR.MEAS
    FILE/WRITELINE,FPTR,LOC58.PR.MEAS
    FILE/WRITELINE,FPTR,LOC59.PR.MEAS
    FILE/WRITELINE,FPTR,LOC60.PR.MEAS
    FILE/WRITELINE,FPTR,LOC61.PR.MEAS
    FILE/WRITELINE,FPTR,LOC62.PR.MEAS
    FILE/WRITELINE,FPTR,LOC63.PR.MEAS
    FILE/WRITELINE,FPTR,LOC64.PR.MEAS
    FILE/CLOSE,FPTR,KEEP


    Example2

    FPTR =FILE/OPEN,C:\APPS\DATA.cvs,WRITE
    FILE/WRITELINE,FPTR,LOC2.Z.MEAS,LOC4.Z.MEAS,LOC6.Z.MEAS
    PCDMIS CAD++ v4.2mr1
    PCDMIS Pro v4.1

  • #2
    Concatenate it

    Code:
    FILE/WRITELINE,FPTR,LOC2.Z.MEAS + "," + LOC4.Z.MEAS + "," + LOC6.Z.MEAS
    <internet bumper sticker goes here>

    Comment


    • #3
      How do you keep it going in one row. When I get to about the 10th or so number. My code stops...... How do you continue in a straight line????
      PCDMIS CAD++ v4.2mr1
      PCDMIS Pro v4.1

      Comment


      • #4
        PCDMIS's column count is 256. My guess is you are exceding the max column count. You may need to use an array.
        <internet bumper sticker goes here>

        Comment


        • #5
          Try using the WRITEBLOCK instead of the WRITELINE

          The date is appended to the line instead of starting a new line each time.


          Code:
          FPTR       =FILE/OPEN,C:\My Part Programs\output.TXT,APPEND
                      FILE/WRITE_BLOCK,FPTR,"Test,"
                      FILE/WRITE_BLOCK,FPTR,"Test1,"
                      FILE/WRITE_BLOCK,FPTR,"Test2,"
                      FILE/WRITE_BLOCK,FPTR,"Test3,"
                      FILE/WRITE_BLOCK,FPTR,"Test4,"
                      FILE/WRITE_BLOCK,FPTR,"Test5,"
                      FILE/WRITE_BLOCK,FPTR,"Test6,"
                      FILE/WRITE_BLOCK,FPTR,"Test7,"
                      FILE/WRITE_BLOCK,FPTR,"Test8,"
                      FILE/WRITE_BLOCK,FPTR,"Test9,"
                      FILE/CLOSE,FPTR
          Yields:

          Test,Test1,Test2,Test3,Test4,Test5,Test6,Test7,Tes t8,Test9,

          in the text file.
          Links to my utilities for PCDMIS

          Comment


          • #6
            Thanks guys that problem has been solved..... How would I take the next part ran and start a new row in the same file??????

            This is what I have so far..

            FPTR =FILE/OPEN,C:\APPS\DATA.CSV,WRITE
            FILE/WRITE_BLOCK,FPTR,LOC2.Z.MEAS
            FILE/WRITE_BLOCK,FPTR,","
            FILE/WRITE_BLOCK,FPTR,LOC4.Z.MEAS
            FILE/WRITE_BLOCK,FPTR,","
            FILE/WRITE_BLOCK,FPTR,LOC6.Z.MEAS
            FILE/WRITE_BLOCK,FPTR,","
            FILE/WRITE_BLOCK,FPTR,LOC8.Z.MEAS
            FILE/CLOSE,FPTR,KEEP
            PCDMIS CAD++ v4.2mr1
            PCDMIS Pro v4.1

            Comment


            • #7
              Add this:

              FILE/WRITELINE,FPTR,""

              Right before the FILE/CLOSE
              Links to my utilities for PCDMIS

              Comment


              • #8
                Thanks!!!!!
                PCDMIS CAD++ v4.2mr1
                PCDMIS Pro v4.1

                Comment

                Related Topics

                Collapse

                Working...
                X