vbacatia

How to get Reference plane from Sketch


I have a random sketch, and I want to know on which plane is the sketch supported through code.

I have gone through the documentation and also looked through the internet and wasn't able to find anything on it. The only thing which I found was how to change sketch support, but I don't want to change sketch support instead I want to know which plane or surface the sketch is supported on and create another sketch on the same plane or surface.

I hope I have explained it clearly, please answer if you have any idea about it. If more information is needed, please let me know.

Thankyou.


Solution

  • You can not get the plane from a sketch via the api (per CAA it should be possible)

    Per GetAbsoluteAxisData you can get the orientation of this plane. Now you can check all other planes of the part if they fit. So you get the likely correct plane.