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.
Solved! Go to Solution.
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.
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?
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.
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.