Showing results for 
Search instead for 
Do you mean 
Reply

Why error with cancel button on this journal?

Hi all,

 

This journal works for changing colors on faces, but when I select cancel button it crash.

 

Why it happnes? Because Windows 8.1 version and NX 9.0.2?

 

Thanks

1 REPLY

Re: Why error with cancel button on this journal?

The reason for the failure is that when you press Cancel the SelectFaces() Sub returns, but has not set the 'selectedObjects' array to anything.

Maybe you should change the SelectFaces Sub to a function and return the result of calling ui.SelectionManager.SelectObjects(). Then the Main() Sub could exit without trying to use the 'selectedObjects' array if Cancel was clicked.

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