Replay Loop Example

  1. Open the model.

  2. Enter the Sketch tool.
    Note: Select the edge of the first hole you intend to convert when you set the sketch plane. This will put the sketch origin on the center of the hole.
  3. Sketch a square around the hole selected to set the sketch plan.

  4. Enter the Pull tool and select the four corner faces.

  5. Pull the faces through the body to remove them.

  6. Select the circular surface and delete it.

  7. Right-click the last script block to insert a Loop below.

  8. Select blocks 2 through 6. These will become the steps of the loop.

  9. Drag the blocks and drop them on the Loop block.

  10. Right-click the Loop block and select Properties. Set up the selections to loop through for creating the squares.
    1. Click Selection
    2. Select the edge of the circle
    3. Power select all the edges with the same length on the top face
  11. Click Update to update the selection.

  12. Click Accept to accept changes.

  13. Note that the Loop block is now a Selection Loop.
    1. Open the Selection Loop block to show the steps.
    2. Right-click block 2 and select properties.
    3. Choose Block7.iter for Selection. This will iterate through all of the selections.
  14. Click Accept Changes.

  15. Click Run Next Line or F10. With each click, the Selection loop will move through its steps, converting each circular hole into a square hole.

  16. Click Run Script or F5 to complete the loop for all the holes.