Creating points using file io readlines

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

  • Creating points using file io readlines

    greetings my fellow pc-dmis users,
    I am working with FILE IO commands for the first time, and i finally got Readlines too work this morning. Im wondering why when i took the points why it didnt create points in the program. It created an ID on the part, but no point in the prg. Also, i cannot dimension any of the IDs. Is this just what it is or is there a way to have the cmm create the point . What is the purpose of FILE IO if you cannot create the point and then dimension it ? Is file read supposed to work hand in hand with File Write, is that the big picture that i am missing here?

  • #2
    I think this is how it works.

    Make sure you are in "program mode".

    Go into your graphics window and select the points you imported. PCDMIS should create these in the "edit window.".

    It doesn't work real well, for me anyways. My grapics window doesn't want to resize properly to select all the points I imported.

    Oh well.

    Good luck.

    B&S CHAMELEON/PCDMIS CAD++ V2011

    There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

    sigpic

    Comment


    • #3
      There are options on the File/import menu that wiil create pcdmis point features from a text file. I think it's called a .XYZ file. The format of this file is documented in the pc-dmis help file

      The I/O commands are not for creating pc-dmis features.

      Some examples for reading files:

      - We have a file on each cmm computer. It contains the name of the cmm, asset number, serial number. We read this file and include this information in report header.

      - Our x1h OPTIONPROBE parameters are stored in a file on a network drive. The part programs read the file and sets all the parameters. This allows us to change the way all of our programs use the x1h by editing a single file.

      - if you have a family of parts, same configuration different sizes and wish to check them with a single program, you can read the part's nominal and tolerance information from a file and the program will adapt .



      Some examples for writing files

      - for each cmm we keep a logfile of what's being checked. Date, time, cmm name,program name, execution time, employee id and so on. This data has been very useful to us.

      - you can write measured data to fiile for spc purposes .

      The possibilities are endless really.

      Comment


      • #4
        Measuring points from a text file can be done like this :
        Code:
         FPTR =FILE/OPEN,POINTS_COORDINATES.TXT,READ
        DO/  
        V1    =FILE/READLINE,FPTR,{xx}+","+{yy}+","+{zz}+","+{ii}+","+{ii}+","+{kk}
        (here, create a vector point with xx, yy, zz as coordinates and ii, jj , kk as vector values)
        UNTIL/EOF("FPTR")      
        FILE/CLOSE,FPTR,KEEP
        It's VERY IMPORTANT to check the last line of the file : if there's a empty line, the cmm will go to measure a point at the origin, the crash can be very close from it !!!!!

        Comment

        Related Topics

        Collapse

        Working...
        X