cancel
Showing results for 
Search instead for 
Did you mean: 

Using custom information from NX feature in drawing

Experimenter
Experimenter

I have some questions about features and 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.

5 REPLIES

Re: Using custom information from NX feature in drawing

Phenom
Phenom

Take a look at User Defined Objects. These are the only sure fire way of storing data that an interactive user cannot access.

I think there are some UDO examples in the sample projects supplied with the NX install. alternatively take a look in the Solution Centre and search for UDO. There are numerous examples there.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Using custom information from NX feature in drawing

Experimenter
Experimenter

Thanks Inch. Currently I am using attributes to save custom information and shall look in 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.

Re: Using custom information from NX feature in drawing

Phenom
Phenom

MB2015 wrote:

Thanks NXJournaling.


Not sure where the NXJournaling came from..

 

Regarding Q2 & Q3, I've not done much work in the drafting side of things, sorry.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Using custom information from NX feature in drawing

Phenom
Phenom

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.

Re: Using custom information from NX feature in drawing

Experimenter
Experimenter

Thanks all of you.

 

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.