cancel
Showing results for 
Search instead for 
Did you mean: 

Highligh a node using NXOpen APIs

Experimenter
Experimenter

I am trying to select a node number using NX UI Block Styler string and action button combination.

The node number is entered in the ‘String’ box and on clicking the 'action' button the respective node should get highlighted and selected.

I can select the node via the code but I cannot get it highlighted.

9 REPLIES

Re: Highligh a node using NXOpen APIs

Genius
Genius

can you post any code and/or a picture? I have not done too much work with Nastran so I am not that familiar with nodes

Re: Highligh a node using NXOpen APIs

Siemens Phenom Siemens Phenom
Siemens Phenom

 

What is the actual class of object that you are trying to highlight?  It is often necessary to call RedisplayObject() after calling Highlight() in order to see the object in a highlighted state.

 

If your object is a member of a class that inherits from DisplayableObject, this method should be available.

 

Re: Highligh a node using NXOpen APIs

Experimenter
Experimenter

The object belongs to FENode class. It doesn't inherit from Displayable object rather it inherits from Tagged object class.

 

How do I highlight an object that inherits from tagged object class?

 

Re: Highligh a node using NXOpen APIs

Phenom
Phenom

Perhaps you could create points on the nodes, and highlight the point objects. Delete the points when you no longer need them.

Re: Highligh a node using NXOpen APIs

Siemens Phenom Siemens Phenom
Siemens Phenom
Or just display a temporary marker on the node. Look at the documentation for Snap.Draw.DrawMarker to see what markers are available. If you don't have access to SNAP, call NXOpen.UF.UFDisp.DisplayTemporaryPoint.
山田
yamada

Re: Highligh a node using NXOpen APIs

Experimenter
Experimenter

Please find the screenshot of the code attached with this reply. It doesn't highlight the desired node.FeNode.JPG

Re: Highligh a node using NXOpen APIs

Siemens Phenom Siemens Phenom
Siemens Phenom

 

Please check the return code from UF_DISP_set_highlight, and if it is non-zero, translate it with UF_get_fail_message().  I am not familiar with that datatype, but if it is not a displayable object, I would expect the set-highlight function to return an appropriate error code.

 

Re: Highligh a node using NXOpen APIs

Experimenter
Experimenter

The node didn't get highlighted since I failed to call UF_initialize method. Now it works fine.

 

 

Re: Highligh a node using NXOpen APIs

Siemens Phenom Siemens Phenom
Siemens Phenom

Why are you jumping through all of these hoops? Simply use a Select Node block in the Block Styler Selection library. This allows you to not only key in individual labels, but also label ranges or graphical selection with all of the associated Smart Selector methods (Related To, Feature Angle, Feature Edge, ...). And, it highlights the selected nodes automatically.