Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX Journal Deselect

Status
Not open for further replies.

TheWenger

Aerospace
Joined
Apr 25, 2013
Messages
16
Location
US
I'm writing a journal that applies a transparency to already selected solids. Once I run the journal though, I want to deselect the bodies. The only thing I've been able find is
Code:
theUI.SelectionManager.RemoveAllFromSelectionList
, which requires a SelectionHandle as one of the parameters. I can't hardly find anything about using a SelectionHandle and can't find a way to initialize one. Is there a way to deselect everything without having to worry about using a SelectionHandle?
 
That's a start. The object types I'm working with are from the DisplayableObject class which doesn't have that method though. NX doesn't like casting a DisplayableObject or a Component to a Body either.
 
Unhighlight is a method in the DisplayableObject class. It should work with all objects that inherit from DisplayableObject. I just used bodyObject as a generic variable name.

www.nxjournaling.com
 
Ahh there it goes. I was trying to apply it to an array of DisplayableObject objects and it recognizing System.Array as the superclass. I just had to apply it to each object in the array via a For loop.

Thanks much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top