Here is one method:
I was able to get things going with your info in both threads as well as the Block Styler Selection opts mentioned in the other thread.
Do you know why UF_ASSEM_is_occurrence() returns false for both the Point Tag and the Face Tag (obtained from ask_parents)?
I was able to get a suitable Face Occ by using the first occ returned by UF_ASSEM_ask_occs_of_entity() (when passing in the Face Tag, Point Tag returns zero occs)
It seems the Smart Objects are not Occurrences, but if the Point is selected without Smart Selection, it is an occurrence.
Can you clarify my confusion? Although it's working for now, I fear the robustness because of this.
Thanks so much for all the help!
Can you describe the assembly structure in some more detail? I assume that you are working in an assembly context and have created an associative point feature at the assembly level on the face of a component. Is this the case? If so, I'd guess that the point links back to the prototype face since that is where the geometry is defined. If you have a reference to a prototype object and need the occurrence, you can use the component's .FindOccurrence method.
Thanks for reply cowski
I'm new to NX programming so the terminology still gets me a bit so I'll explain as best I can.
Yes, I'm working with an assembly. However, to create the Associative Point, I use Make Work Part for the part that has the face that the point is going to be associated with. Then I switch back to the top Assembly using Make Work Part and from there the Point is selected.
So I assume using FindOccurrence is not be possible because I don't have a component, the only thing I know is which Point was selected.
Since you changed the work part before creating the point, the face you selected was the prototype face and the point created will be the prototype point in the model file. When you switch back to the assembly and select the point, you should be selecting the assembly occurrence object of the prototype point. You can query the occurrence point to find out which component it belongs to.
If you want to understand assemblies, occurences, prototypes, and so so, there are a couple of documents that might help. Read "Getting Started with SNAP", or "Getting Started with NX/Open". The first one has been around for a few years; the second one was new with NX11. They both have chapters on assemblies. In fact, if you're new to NX/Open programming, thse documents might give you useful information about numerous things, not just assemblies.
Thanks again for the reply, cowski1
Everything you described is accurate as to my process
The one trouble spot seems to be the selected point is NOT recognized as an occurrence
You mentioned that I can query the occurrence point to find out which component it belongs to, but UF_ASSEM_is_occurrence() returns false for the selected point
Despite that, I tried UF_ASSEM_ask_part_occurrence(), but it expectedly returns NULL_TAG
Is there a different function I should be using to query the point for its owning component?