How to get the origin of a hole

Welcome to my new blog where I’ll be sharing more of my CATIA macro tips and tricks! To start things off I’ll show you how to get the origin of a hole in a CATPart.

Assumptions: a single CATPart is the ActiveDocument

To test this macro, setup your own example part:

  1. Create a new CATPart in PartDesign.
  2. Create a pad.
  3. Place a hole in the pad.

Now maybe you’re thinking, just getting the origin of a hole isn’t very useful. But doing this exercise will also show you how to set up a selection filter and an example of how to use SelectElement2.Plus, once you get the hole origin maybe there are additional things you can do with it. Follow along in the CATScript code with my comments.






 End Result:

catia hole origin


Create a new point at the location of the hole origin with a macro.

Add a Comment

Your email address will not be published. Required fields are marked *