Using 3D Features information in drawings

1. How to save custom infomation with parts(if possible with features of part)? The information should be persistant and should not be accessible & invisible to user. It should be editable later by program
Example: Hole in part has some specific information like tolerance source etc. That information needs to be saved in the hole feature. It should be later accessible to use like in drawing etc.

2. How to get feature object in drawingview? We need feature information like its position(like mid center of hole) and custom information which we stored before. We want to display this information using NX Ballon > Leader in drawing. Position of feature is needed to find optimum position of the Ballon.

3. How to place Ballon in nearby empty area of hole? Pointer to any available method or algorithm will be useful.

There is the "customer area" that you can write to in a part file. It is inaccessible and invisible to the user, but it isn't very flexible. Space is limited to a 132 character string.

You could use feature or object attributes to save the information. The info would not be "inaccessible and invisible", but users do not normally apply or edit such attributes so the information would likely remain unseen (such information is not shown by default in the NX GUI).

Thanks NXJournaling.
I have applied your suggestion. It is not perfect solution for my need but it is sufficient.

Do you have any suggestion for Q2 and Q3?
It will be great if you share those.

2) Many features have a .Location property that will return the coordinates in absolute space. You could use this information along with the MapModelToDrawing method to locate the feature on the drawing.

3) I don't know of an easy, fool-proof way to do this but I have a few ideas that might be made to work.

  • Pick a spot near the hole feature, use the drafting view's .AskVisibleObjects to get all the visible objects in the view, use a measurement function (such as AskMinimumDist) to make sure none of the visible objects overlap the ID symbol.
  • Ask the bounding box of the model, map the coordinates of the box into the drawing space (MapModelToDrawing) and place the balloon outside of the box
  • Query the bounds of the drafting view, place the balloon outside of the drafting view bounds.

Thanks NXJournaling.

I am able to map feature location with drawing location.

However, I am not able to find if features are visible in View or now. For example hole is visible in front view but now in top view. Then in case of top view, I do not know, how to check it the hole feature is visible or not.

I tried AskVisibleObjects() of view. This is sample code and its output.

Dim DispObjs() As DisplayableObject
DispObjs = member_view.AskVisibleObjects()
lw.WriteLine("visible objects count = " & UBound(DispObjs, 1) - LBound(DispObjs, 1) + 1)
For Each DispObj As DisplayableObject In DispObjs
lw.WriteLine("visible objects = " & DispObj.ToString())
Next

Output

visible objects count = 9
visible objects = Point 38828
visible objects = CartesianCoordinateSystem 39076
visible objects = Body 55962
visible objects = DatumAxis 38674
visible objects = DatumAxis 38673
visible objects = DatumAxis 38672
visible objects = DatumPlane 38667
visible objects = DatumPlane 38666
visible objects = DatumPlane 38665

There is no mention of hole feature. If you have any idea, then it will be great if you share with me.