Showing results for 
Search instead for 
Do you mean 
Reply

Deselect a CAM Operation in Operation Navigator

Hi All,

I want to unselect any/all CAM operations in  Program Order View.

 

Manually this can be done by pressing "Esc" key on keyboard or by a mouse click elsewhere on the Operation Navigator.

I am trying to automate the same.

 

I tried using following code which I found in this community.

 

private void deselectAll(){
IntPtr hwnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
SetForegroundWindow(hwnd);
SendKeys.SendWait("{ESC}");
}

 

The above code doesnt work as I am unable to call/set "SetForegroundWindow" in NX open.

Any other ways of doing this?

 

 

 

 

2 REPLIES

Re: Deselect a CAM Operation in Operation Navigator

We are not aware of API to deselect a node. In the automation layer, the functions usually do not work on the “selected” objects, but you pass the object(s) to the corresponding function.

What are you trying to do? i.e. why do you want to deselect the nodes? 

Mark Rief
Retired Siemens

Re: Deselect a CAM Operation in Operation Navigator

Hi Mark,

I am creating a tool which

1) Requires user to select an operation. 

2) If correct inputs are given, the tool is executed. 

3) If there is any error, then the tool aborts and exits the program.

However, the operation selected by user still is highlilghted in NX which I would like to deselect.

 

 

Thanks

Faisal