Cancel
Showing results for 
Search instead for 
Did you mean: 

The object being queried is not smart

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello everyone!

 

How come that I can call theUFSession.So.AskChildren on a drafting vew tag, but attempting the theUFSession.So.AskParents on the same tag gives me an error "NXOpen.NXException: The object being queried is not smart"? Is this as designed? Or am I doing somethng wrong?

3 REPLIES

Re: The object being queried is not smart

Honored Contributor
Honored Contributor

Try using the .IsSo method on the object to verify if it is a smart object or not before calling the other SO methods. If it reports "True" and you get the "object is not smart" error, I'd suggest contacting GTAC.

Re: The object being queried is not smart

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Well, it returns False. But happily works with the So.AskChildren. This is something I don't get.

Re: The object being queried is not smart

Honored Contributor
Honored Contributor

An object does not need to be smart to have smart children. Consider the following: create 2 unassociative point objects in your part file, now create an associative line connecting the point objects; the point objects are not smart, but there are other smart objects that reference them. The function will return the smart objects that reference the points, but the points themselves are not smart and have no smart parents.