hexagon logo

How do you get data from a loop?

Hey everyone,

I'm still new and learning PC-DMIS. I want to learn more about looping and variables as I can see it being an important tool to make programming quicker.

So I have a round part and it has 12 tabs around it every 30 degrees. What I want is for it to loop around the part grabbing a point on the outer tab. After I want to construct a circle (best fit) and output the dia for my report.

How can I go about this?

So the code I have so far is this
V1         =LOOP/START,ID=YES,NUMBER=12,START=1,SKIP=,
              OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=30
OUTER-RAD-TAB_1  =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
              THEO/<0,-7.546,-0.15>,<0,-1,0>
              ACTL/<0,-7.546,-0.15>,<0,-1,0>
              TARG/<0,-7.546,-0.15>,<0,-1,0>
              SNAP=NO
              SHOW FEATURE PARAMETERS=NO
              SHOW CONTACT PARAMETERS=YES
                AVOIDANCE MOVE=NO,DISTANCE=0
              SHOW HITS=NO
            LOOP/END​
Parents
  • Look up offsetting alignments in a loop.
    There are a lot of ways to accomplish your goal.

    But if you are trying to construct a feature with the measured points, I would recommend paste w/ pattern over a loop.
    One input feature will not be enough to create your diameter. And I'm not sure that using the outer-rad-tab_1[1],[2]-[11],outer-rad-tab_1[12] will work in a circle construction.
Reply
  • Look up offsetting alignments in a loop.
    There are a lot of ways to accomplish your goal.

    But if you are trying to construct a feature with the measured points, I would recommend paste w/ pattern over a loop.
    One input feature will not be enough to create your diameter. And I'm not sure that using the outer-rad-tab_1[1],[2]-[11],outer-rad-tab_1[12] will work in a circle construction.
Children