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
  • You can construct the circle from "OUTER-RAD-TAB_1[1..12] " directly.
    The easiest way to do it is creating a feature set selecting "OUTER-RAD-TAB_1" in the list, then ad brackets with1..12 in the edit window, and then construct the circle.
    You can dirctly construct the circle, but the demon could say that you can't construct a circle from 1 point Disappointed...

    In addition, you shouldn't use "-" in the feature name, prefer "_".
Reply
  • You can construct the circle from "OUTER-RAD-TAB_1[1..12] " directly.
    The easiest way to do it is creating a feature set selecting "OUTER-RAD-TAB_1" in the list, then ad brackets with1..12 in the edit window, and then construct the circle.
    You can dirctly construct the circle, but the demon could say that you can't construct a circle from 1 point Disappointed...

    In addition, you shouldn't use "-" in the feature name, prefer "_".
Children