We're currently running NX 9.03.4 and what I am looking to create is a journal where the end user specifies the face of a body to be drafted. A sheet is created, a view is created and centerlines and dimensions are added automatically to the face for all the various holes that are found.
The problem I'm having is in drafting, there seems to be a lack of useful NXOpen API and I have very little exposure to UF.
I have the Body object and the Face that I want drafted. But after a View is created of the body, drafting elements need to be created with their association to the DraftingCurve objects not the bodies edge curves. How can you find the DraftingCurve of a given DraftingView that represents an edge of a Body and vice-versa? It seems like there has to be some function to correlate the two.
We are rolling to NX11. I have subsequently found that using ufs.Draw.AskDraftingCurveType(...) and ufs.Draw.AskDraftingCurveParents(...), which were both introduced to the .NET API in NX10, you can accomblish this task.
It's easier to take a drafting curve and find the geometry that created it and harder to find the drafting curves created given an object, but it's possible to construct a solution.
Solved! Go to Solution.
which are referenced in @SteveLabout's answer. For some reason my NXOpen.UF.dll file in UGII/managed/ says that it's version is 220.127.116.11 even though I have 18.104.22.168 MP12 installed currently and doesn't seem to contain the wrapper for these functions.
I assume that with UF_DRAW_ask_drafting_curve_parents I would be able to get the edge curve that corresponds to a given drafting curve? Going the other way I would then loop through all the drafting curves and check if it's parent is the known edge that I'm looking for?
EDIT : Looking at the NX10 Release Notes, these two functions are listed in the New Open C routines section. I'm hoping there is some sort of work around.
It is quite unusual that we introduce new functions in a maintenance release, rather than in a new major version. (There was a pressing need for these.) They were not wrapped for the .Net kits in NX9. The wrappers should be available in NX10. So in NX9, you can only use them in Open C/C++.