XYZ file labels

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

  • XYZ file labels

    I am working with a XYZIJK file for the first time.
    The engineer here worked with it along time ago.
    What we can not find is how to place the Element number (label) in the text file so it imports.
    Thanks,
    I can explain it to you, but I can't understand it for you.

  • #2
    It could depends on how many features you want to import.
    If there are not so many, you can read the file in a loop, instead of import it, so you can create a file with the name of each feature.

    Comment


    • #3
      We just did a test program with 14 vector points so we could figure out what we're doing.
      He plans on using a whole lot more.
      So what you're saying is that we can not put labels in the text file that has the vector points in it?
      That "read the file in a loop, instead of import it," is that an I/O command in the edit window? Can I find that in the Help file?
      Thanks again,
      I can explain it to you, but I can't understand it for you.

      Comment


      • #4
        Something like this should work :
        Code:
        FPTR =FILE/OPEN,POINTS_COORDINATES.TXT,READ
        DO/
        V1 =FILE/READLINE,FPTR,{name}+","+{xx}+","+{yy}+","+{zz}+", "+{ii}+","+{jj}+","+{kk}
        NAME =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
        THEO/<XX,YY,ZZ>,<II,JJ,KK>
        ACTL/<1,2,3>,<0,0,1>
        TARG/<XX,YY,ZZ,>,<II,JJ,KK>
        SNAP=NO
        SHOW FEATURE PARAMETERS=NO
        UNTIL/EOF("FPTR")
        FILE/CLOSE,FPTR,KEEP
        With a text file like :
        pt1,12,0,15,0,0,1
        pt2,15,33,0,0,0,1 ...

        Comment


        • #5
          FPTR =FILE/OPEN,S:\IGES FOR CMM\T954\TIP_SLIDE\T954_TS.XYZ,READ
          DO/
          V1 =FILE/READLINE,FPTR,{name}+","+{xx}+","+{yy}+","+{zz}+", "+{ii}+","+{jj}+","+{kk}
          NAME =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
          THEO/<XX,YY,ZZ>,<II,JJ,KK>
          ACTL/<0,0,0>,<0,0,1>
          TARG/<XX,YY,ZZ>,<II,JJ,KK>
          SNAP=NO
          SHOW FEATURE PARAMETERS=NO
          SHOW CONTACT PARAMETERS=NO
          UNTIL/EOF("FPTR")
          FILE/CLOSE,FPTR,KEEP

          So I have this code in the program.
          When it executes it places a single point at 0,0,0 labeled XYZIJK
          The actual text file has 40 points.
          The Do/Until is red. Can't figure why it won't read in?
          Just using import file does not work.

          Text file looks like:
          XYZIJK
          P50,0.0492,3.3633,3.3464,-0.9848,0.1736,0.0000
          P51,0.0000,2.8440,3.4451,-1.0000,0.0000,0.0000

          Any help would be appreciated,
          I can explain it to you, but I can't understand it for you.

          Comment


          • #6
            XYZIJK METRIC
            CR001 3535.909 -719.5 669.5 0 0 1
            CR002 3525.96 -715.4 740.5 0 0 1
            CR003 3622 -690 819 0 0 1
            CP001 3600 -712 544 0 0 1
            [/CODE]

            XYZIJK followed by 6 spaces (MUST be there) followed by metric.

            Not sure if there are exact spacing requirements for the features.

            This is the points.xyz file that you import into Pcdmis. You then click on each point (wire frame mode) and it will populate it with the XYZIJK values and the feature ID.

            feature ID, XXXX.XXX YYYYY.YYY ZZZ.ZZZ I.IIIII J.JJJJJ K.KKKKK

            won't work for EDGE points and it may or may not work with a circle (you also need the diameter for the circle, but not sure it really works like it should)

            NO COMMAS between values!
            Last edited by Matthew D. Hoedeman; 05-13-2020, 10:28 AM.
            sigpic
            Originally posted by AndersI
            I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

            Comment


            • #7
              Thanks for the reply Matt.
              This program is in inches so I did not need the word METRIC.
              The NO commas was the trick to be able to import the file via FILE\IMPORT\XYZ.
              Just trying to save some time from clicking on individual points.
              I can explain it to you, but I can't understand it for you.

              Comment


              • #8
                For future reference: If these are required inspection points the CAD engineer can add them on the model, when you import the cad file the points will be shown.

                You can then open Auto vector point dialog, and box select (Left-click and hold and drag a box around the entire model) to create them all in one hit. You can probably get it to name them by setting the default prefix.
                Automettech - Automated Metrology Technology

                Comment


                • Matthew D. Hoedeman
                  Matthew D. Hoedeman commented
                  Editing a comment
                  There is an option that MIGHT do it for you. It is in V3.7, hopefully it is in your version as well. F5 general tab, USE CAD PROVIDED ID's FOR FEATURES.

                • bphillips
                  bphillips commented
                  Editing a comment
                  BINGO!
                  That will speed things up.
                  Thank you.

                • Matthew D. Hoedeman
                  Matthew D. Hoedeman commented
                  Editing a comment
                  no problem.

              • #9
                I was able to use surface point and box select and put all 40 points in the program in 2 seconds, but it does not keep the labels.
                Setting the default prefix only worked for the first point.
                I can explain it to you, but I can't understand it for you.

                Comment


                • #10
                  bphillips

                  Does Matts suggestion work? (Use CAD provided ID's)
                  Automettech - Automated Metrology Technology

                  Comment

                Related Topics

                Collapse

                Working...
                X