How to get feature from selected Curve

Hello All,

I am selecting curve from graphic window by using NXOpen. I want to know which feature created this curve, like sketch or Associative curve or Project curve.

Is there anyway with which we can query and get that curve's parent feat which created that curve.

i have tried using AskEntityParents() but it does not work.

Thanks in advance

Given an object, the .AskObjectFeat method will tell you which feature created it (if any). Some example code can be found here: