Looping Dim Statements

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

  • Looping Dim Statements

    I have seen alot on Looping measurement steps, but I have not seen anything (or at least couldn't find) about how you would loop a series of DIM statements. I have a group of repetitive features and the loop works good, except all the shows on the report is the last dimension in the loop. It does not show the previous 7 dimensions.

    The code works. It loops through all steps the right amount of times. But it only shows the last lop on the report. Am I wasting my time here with this - I mean does it not work?

    Code:
                COMMENT/DOC,NO,**************
                              ,WALL THICKNESS
                              ,**************
                ASSIGN/TOTALSLICES = 8
    WALLTHICKNESS=LOOP/START, ID = NO, NUMBER = TOTALSLICES, START = 1, SKIP = ,
                   OFFSET: XAXIS = 0, YAXIS = 0, ZAXIS = 0, ANGLE = 0
                COMMENT/REPT,
                            ,WALL THICKNESS
                ASSIGN/WALLTHICK1 = "WALLTHICK1_" + WALLTHICKNESS
                ASSIGN/FP1 = "FWD_PT1_" + WALLTHICKNESS
                ASSIGN/AP1 = "AFT_PT1_" + WALLTHICKNESS
                ASSIGN/WALLTHICKNOM = .085
    DIM WALLTHICK1= 3D DISTANCE FROM POINT FP1 TO POINT AP1, NO_RADIUS  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=1.00  OUTPUT=BOTH
    AX    MEAS      NOMINAL     +TOL       -TOL        DEV      OUTTOL   
    M      0.0847  WALLTHICKNOM     0.0060     0.0060    -0.0003     0.0000 ----#----
                ASSIGN/WT[((WALLTHICKNESS-1)*3)+1] = WALLTHICK1.M.MEAS
                COMMENT/DOC,NO,*******************
                ASSIGN/WALLTHICK2 = "WALLTHICK2_" + WALLTHICKNESS
                ASSIGN/FP2 = "FWD_PT2_" + WALLTHICKNESS
                ASSIGN/AP2 = "AFT_PT2_" + WALLTHICKNESS
    DIM WALLTHICK2= 3D DISTANCE FROM POINT FP2 TO POINT AP2, NO_RADIUS  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=1.00  OUTPUT=BOTH
    AX    MEAS      NOMINAL     +TOL       -TOL        DEV      OUTTOL   
    M      0.0861  WALLTHICKNOM     0.0060     0.0060     0.0011     0.0000 -----#---
                ASSIGN/WT[((WALLTHICKNESS-1)*3)+2] = WALLTHICK2.M.MEAS
                COMMENT/DOC,NO,*******************
                ASSIGN/WALLTHICK3 = "WALLTHICK3_" + WALLTHICKNESS
                ASSIGN/FP3 = "FWD_PT3_" + WALLTHICKNESS
                ASSIGN/AP3 = "AFT_PT3_" + WALLTHICKNESS
    DIM WALLTHICK3= 3D DISTANCE FROM POINT FP3 TO POINT AP3, NO_RADIUS  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=1.00  OUTPUT=BOTH
    AX    MEAS      NOMINAL     +TOL       -TOL        DEV      OUTTOL   
    M      0.0835  WALLTHICKNOM     0.0060     0.0060    -0.0015     0.0000 ---#-----
                ASSIGN/WT[((WALLTHICKNESS-1)*3)+3] = WALLTHICK3.M.MEAS
                COMMENT/DOC,NO,*******************
                LOOP/END
    Last edited by cmmguy; 01-23-2007, 09:00 AM.
    Links to my utilities for PCDMIS

  • #2
    Take a look at the "last execution report", they'll all be there.

    TK
    sigpicHave a homebrew

    Comment


    • #3
      They werent and they werent in the saved PDF of the report(that is done automatically at the end of the program)
      Does stepping through the program affect what gets into the "Last Execution Report". I am still debugging this program.
      Links to my utilities for PCDMIS

      Comment


      • #4
        I think your code isnt working as intended because of how your addressing your feature names.

        Just remember that when your features are measured within a loop then the feature name will automatically be placed within an array. The array number of that feature would be the loop id of the feature. I didn't see how your resolving each features array number in your dimensions. So if you fix the addressing of the features your using to include each features loop ID when it was measured. You should get the result your looking for.

        If you can post the rest of your code or the parts where your creating and measuring the points called "FWD/AFT_PT1_" + WallThickness. I should be able to post a fix for it as well.
        Mr. Comment
        SCIROCCO-NT 13-20-10
        B3C-LC Controller (Leitz Protocol), SP600M, TP200
        PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
        sigpic

        Comment


        • #5
          All of the rest of the code works fine. I am using variables for the feature names, not looping arrays ID's.

          Here is the first part of the loop that creates teh features. There are lot of features so I dont want to paste all of the code.

          Code:
          FWD_LOOP   =LOOP/START, ID = NO, NUMBER = TOTALSLICES, START = 1, SKIP = ,
                         OFFSET: XAXIS = 0, YAXIS = 0, ZAXIS = 0, ANGLE = 0
                      ASSIGN/ROTATE_AMT = OFFSETANGLE*(FWD_LOOP-1)
          FWD_ROTATE =ALIGNMENT/START,RECALL:FINAL_BA, LIST= YES
                      ALIGNMENT/ROTATE_OFFSET,ROTATE_AMT,ABOUT,XPLUS
                      ALIGNMENT/END
                      ASSIGN/TPX = 1.048
                      ASSIGN/TPY = 0
                      ASSIGN/FWD_PT_1 = "FWD_PT1_" + FWD_LOOP
          FWD_PT_1   =FEAT/POINT,RECT
                      THEO/TPX,V0,WEBPOINT1,-V1,V0,V0
                      ACTL/1.0566,0.0007,5.0002,-1,0,0
                      MEAS/POINT,1
                      HIT/BASIC,NORMAL,TPX,V0,WEBPOINT1,-V1,V0,V0,1.0566,0.0007,5.0002,USE THEO = YES
                      ENDMEAS/
          Links to my utilities for PCDMIS

          Comment


          • #6
            Can you dimension inside the same loop you are measuring? That would make things easier in regards to what these guys are talking about.

            Otherwise you might have to code in the index number of the looped ID, if that will even work.

            Maybe with:
            Code:
                        ASSIGN/WALLTHICK1 = "WALLTHICK1_" + "[" + WALLTHICKNESS + "]"
            Not exactly that but something along those lines that will get the index number of the feature. Perhaps in this line:

            Code:
            DIM WALLTHICK1= 3D DISTANCE FROM POINT FP1[WALLTHICK] TO POINT AP1[WALLTHICK]
            Craig
            Last edited by craiger_ny; 01-23-2007, 11:42 AM.
            <internet bumper sticker goes here>

            Comment


            • #7
              Originally posted by cmmguy View Post
              They werent and they werent in the saved PDF of the report(that is done automatically at the end of the program)
              Does stepping through the program affect what gets into the "Last Execution Report". I am still debugging this program.
              The results in last execution report are generated from an execution of the program, if your last one is showing up you've got the reporting right, execute it, they'll be there.

              TK
              sigpicHave a homebrew

              Comment


              • #8
                Originally posted by craiger_ny View Post
                Can you dimension inside the same loop you are measuring? That would make things easier in regards to what these guys are talking about.

                Otherwise you might have to code in the index number of the looped ID, if that will even work.

                Maybe with:
                Code:
                            ASSIGN/WALLTHICK1 = "WALLTHICK1_" + "[" + WALLTHICKNESS + "]"
                Not exactly that but something along those lines that will get the index number of the feature. Perhaps in this line:

                Code:
                DIM WALLTHICK1= 3D DISTANCE FROM POINT FP1[WALLTHICK] TO POINT AP1[WALLTHICK]
                Craig
                No. The measurements are part of a bigger set of measurements that are need to get some thicknesses. I may have to go to the index values.



                [QUOTE=tking;45893]The results in last execution report are generated from an execution of the program, if your last one is showing up you've got the reporting right, execute it, they'll be there.

                TK[/QUOTE

                OK, thanks. I am going to try a full run without stops to see if the dims show up.
                Links to my utilities for PCDMIS

                Comment


                • #9
                  hi,
                  i second that is has to to with the debug-mode!

                  Comment


                  • #10
                    Originally posted by bitsandmore View Post
                    hi,
                    i second that is has to to with the debug-mode!
                    Tell us more!

                    Thanks,

                    TK
                    sigpicHave a homebrew

                    Comment


                    • #11
                      OK, here is an update. As suspected, the debug mode is why the dimensions did not show up on the report. The original code works as shown for the dimensions and now that I had a chance to run the program all the way through(no break points) it works good.


                      .. beer
                      Links to my utilities for PCDMIS

                      Comment


                      • #12
                        yeah, or check that the comments are marked lol

                        i've putbreak points in a loop before... they all work
                        Last edited by elvis; 01-23-2007, 08:21 PM.

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X