I'm working on an application for NX that needs to disable the NX buttons so that the user does not create or modify geometry while that application is running. In NX 8, I used the following code in VB:
Dim theUI As NXOpen.UI = NXOpen.UI.GetUI() theUI.LockAccess()
To unlock the UI, I do this similarly:
Like I mentioned, this was working in NX 8, but no longer works in NX 9. Any ideas? Is there a new API? Any workarounds?
We still expect that to work in NX9. I don't think it has ever completely locked the UI - for example, I think it lets you do things like Info -> Object - but if it is behaving substantially different for you, then please log an IR with GTAC so we can investigate thoroughly.
If you want to completely lock users out of the NX interface, you can put up a modal Winform (assuming you are on Windows) using ShowDialog().
Thanks for your response.
I don't want to completely lock them out. I'm fine with them zooming around and even doing Info > Object. Our application extracts data from the part and so we are assuming the data isn't changing while they are running our application.
Is there any other API call that I can make to disallow editing objects?
Well, there is the old Open C version: UF_UI_lock_ug_access(), which is wrapped as UFUi.LockUgAccess(), but I would be surprised if it behaves any differently than the other one.
I would like to test this to see if I can reproduce it. Can you let me know exactly what version of NX9 you are running?
What is holding you of from installing NX 9.0.3?
It is the third service pack for NX9 and many things are fixed there.
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX11.0 EAP, NX12.0 EAP
How to Get the Most from Your Signature in the Community