Looping issue?

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

  • Looping issue?

    So... I have a part that is 2 peices and some of the features from 1 half are toleranced from features on the other half. the lower half is measured first and the required features are written to a txt file. the upper half program reads in the txt file and creates said features and sets datums on those features. one particular feature is datum H (48x) individually a threaded hole. and the counterbore feature in the upper part is toleranced back to the hole in the lower half. So I loop reading in the txt file for the 48 instances. and create said datums h1, h2, h3..... then I get this error. I do not understand what if anything I am doing incorrect as I have done this exact tolerancing scheme many times before. looking at the CAD window, all features and datums create in the proper location. Looking for help from the GURUS. Code below picture. 2020 R1 SP4

    Capture.JPG
    Code:
    ASSIGN/COUNT=1
    DO/
    V8 =FILE/READLINE,FILE1,{HX[COUNT]}+","+{HY[COUNT]}
    H =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$
    NOM/XYZ,<0,0,0>,$
    MEAS/XYZ,<HX[COUNT],HY[COUNT],0>,$
    NOM/IJK,<0,0,1>,$
    MEAS/IJK,<0,0,1>,$
    DIAMETER/0.252,0.252
    ASSIGN/COUNT=COUNT +1
    UNTIL/V8 == "EOF"
    FILE/CLOSE,FILE1,KEEP
    DATDEF/H1,FEATURES=H[1],,
    DATDEF/H2,FEATURES=H[2],,
    DATDEF/H3,FEATURES=H[3],,
    DATDEF/H4,FEATURES=H[4],,
    DATDEF/H5,FEATURES=H[5],,
    DATDEF/H6,FEATURES=H[6],,
    DATDEF/H7,FEATURES=H[7],,
    DATDEF/H8,FEATURES=H[8],,
    DATDEF/H9,FEATURES=H[9],,
    DATDEF/H10,FEATURES=H[10],,
    DATDEF/H11,FEATURES=H[11],,
    DATDEF/H12,FEATURES=H[12],,
    DATDEF/H13,FEATURES=H[13],,
    DATDEF/H14,FEATURES=H[14],,
    DATDEF/H15,FEATURES=H[15],,
    DATDEF/H16,FEATURES=H[16],,
    DATDEF/H17,FEATURES=H[17],,
    DATDEF/H18,FEATURES=H[18],,
    DATDEF/H19,FEATURES=H[19],,
    DATDEF/H20,FEATURES=H[20],,
    DATDEF/H21,FEATURES=H[21],,
    DATDEF/H22,FEATURES=H[22],,
    DATDEF/H23,FEATURES=H[23],,
    DATDEF/H24,FEATURES=H[24],,
    DATDEF/H25,FEATURES=H[25],,
    DATDEF/H26,FEATURES=H[26],,
    DATDEF/H27,FEATURES=H[27],,
    DATDEF/H28,FEATURES=H[28],,
    DATDEF/H29,FEATURES=H[29],,
    DATDEF/H30,FEATURES=H[30],,
    DATDEF/H31,FEATURES=H[31],,
    DATDEF/H32,FEATURES=H[32],,
    DATDEF/H33,FEATURES=H[33],,
    DATDEF/H34,FEATURES=H[34],,
    DATDEF/H35,FEATURES=H[35],,
    DATDEF/H36,FEATURES=H[36],,
    DATDEF/H37,FEATURES=H[37],,
    DATDEF/H38,FEATURES=H[38],,
    DATDEF/H39,FEATURES=H[39],,
    DATDEF/H40,FEATURES=H[40],,
    DATDEF/H41,FEATURES=H[41],,
    DATDEF/H42,FEATURES=H[42],,
    DATDEF/H43,FEATURES=H[43],,
    DATDEF/H44,FEATURES=H[44],,
    DATDEF/H45,FEATURES=H[45],,
    DATDEF/H46,FEATURES=H[46],,
    DATDEF/H47,FEATURES=H[47],,
    DATDEF/H48,FEATURES=H[48],,

  • #2
    Hmmm. I think I would change the naming scheme of your features called up for Datum H and remove the brackets. I wouldn't be surprised if PCDMIS didn't like H[1] as a Datum. Maybe use H_1

    Comment


    • #3
      I'm not sure if it's been updated to allow more, but in 2015.1, I am only allowed to use 2 characters for datum names. H48 is three characters and my version won't even let me create a datum with that name. I ran into the same exact issue, and my workaround was to use letters instead of numbers for the second character. Instead of D1 thru D12, I used DA thru DL. With 48 instances, this won't really work for you either though, but this is my guess as to why it won't work

      Comment


      • #4
        Originally posted by Mike Ruff View Post
        I'm not sure if it's been updated to allow more, but in 2015.1, I am only allowed to use 2 characters for datum names. H48 is three characters and my version won't even let me create a datum with that name. I ran into the same exact issue, and my workaround was to use letters instead of numbers for the second character. Instead of D1 thru D12, I used DA thru DL. With 48 instances, this won't really work for you either though, but this is my guess as to why it won't work
        2020 allows 3 characters for datums, that is not the issue, if i remove the loop it works, i just didnt want to code 48 readlines, 48 create features and 48 datdefs for 1(48x) feature. loops make it much faster.....when it works.

        Comment


        • #5
          Originally posted by fordrox View Post

          i just didnt want to code 48 readlines, 48 create features and 48 datdefs for 1(48x) feature. loops make it much faster.....when it works.
          Copy and paste with pattern?

          Jesse Krook

          Comment


          • #6
            I would think you need to create a feature set out of all 48 H's. Then define your datum H to the set. Here's a generic code.

            Code:
            ASSIGN/COUNT=0
            ASSIGN/ANGLE=0
            DO/
            ASSIGN/COUNT=COUNT+1
            ASSIGN/ANGLE=ANGLE+7.5
            H =GENERIC/POINT,DEPENDENT,POLAR,$
            NOM/XYZ,<10,ANGLE,0>,$
            MEAS/XYZ,<10,ANGLE,0>,$
            NOM/IJK,<0,0,1>,$
            MEAS/IJK,<0,0,1>
            UNTIL/COUNT==48
            SCN1 =FEAT/SET,CARTESIAN
            THEO/<0,0,0>,<0,0,1>
            ACTL/<0,0,0>,<0,0,1>
            CONSTR/SET,BASIC,H[1..48],,
            DATDEF/H,FEATURES=SCN1,,

            Comment


            • #7
              This same thing happened to me when I tried to use "A_B". The callout was something like

              Perpendicularity|Ø2|A-B

              We had to get a print change however because A was a plane in the Z+ and B was a plane in the Y-. The problem was that the feature was a line going from Y- to Y+. The line wouldn't be perpendicular to A, it would have been parallel.

              Silly design engineers. Sorry this doesn't help, just wanted to share my story.

              Comment


              • DAN_M
                DAN_M commented
                Editing a comment
                I would have reported the perpendicularity as -90° just to get a reaction

            Related Topics

            Collapse

            Working...
            X