API Instructions: Oring Mate

O-ring Procreator



Place Oring Mate.swp in a safe folder location. Assign hot key, or icon to execute command within SOLIDWORKS.


This macro has assumptions about how you currently set up your model in order to place multiple mates for o-rings in one go.

  • The top level assembly has an Axis named ‘Axis1’ along the center
  • Your o-rings also have an Axis named ‘Axis1’ that cooresponds to the top level assembly center.
  • Your o-rings have a plane named ‘CENTER’ that defineds the center of the groove location.
  • The Front Plane in the assembly and o-ring are 90 degrees from the center plane of the groove.

You can select as many selections as you want. The macro will take every other selection pair to perform the mating conditions with. Selection 1 is a face from the o-ring, Selection 2 is the bottom face of the groove. Selection 3 is the next o-ring; Selection 4 is the next bottom face of its corresponding groove, and so on.

First it will take and find the adjacent faces to the bottom groove face and apply a symmetric mate between the CENTER plane of the o-ring and these two faces.

Then it will mate the Axis1 from the o-ring to the Axis1 of the top level assembly.

Next it will place a parallel mate between the Front Plane of the top level assembly and the Front Plane of the o-ring.

Lastly, it repeats this process for how many selections you have made.

Usage Agreement

The software/macro/customization is supplied “as is” and all use is at your own risk. GoEngineer disclaims all warranties of any kind, either express or implied, as to the features and functionality. Neither this agreement nor any documentation furnished under it is intended to neither express or imply any warranty that the operation of the software will be error‐free nor cause undesirable results on files that it is ran against. Under no circumstances shall GoEngineer be liable to any user for direct, indirect, incidental, consequential, special, or exemplary damages, arising from or relating to this agreement, the software, or users use or misuse of the software or any other services provided by GoEngineer. Such limitation of liability shall apply whether the damages arise from the use or misuse of the software or any other services supplied by GoEngineer (including such damages incurred by third parties), or errors of the software. Use of the software/macro/customization constitutes acceptance to this agreement.