Does anybody have any workaround to switch application from Manufacturing to Modeling or Gateway?
If I start my app from Manufacturing, I'm not able to switch NX Application. But it works, when app is started for example from Modeling.
I use theSession.ApplicationSwitchImmediate() for this.
It always gives an error: 896084.
I see there is several PRs existing about it, I created another one - and it is not fixed even in NX12.
I can't imagine for how long such basic method might be not working?
Maybe someone faced this problem and found some workaround and can share it?
The application is switched when the DLL is unloaded, this is described in the remarks of the method.
I have never had any need to switch applications, I just include the following code to make sure the current application is the correct one.
' uncomment the following lines to check for the correct application Dim AppID As Integer = UFConstants.UF_APP_NONE theUFSession.UF.AskApplicationModule(AppID) If AppID <> UFConstants.UF_APP_CAM Then theUI.NXMessageBox.Show("Application missmatch", NXMessageBox.DialogType.Error, "No NX CAM session, Exiting!") Exit Sub End If
The NXOpen API has access to all objects even from gateway.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide
You are probably referring to ApplicationSwitchRequest() - which works as you described.
But ApplicationSwitchImmediate() should do this immediately - and it does, but fails if it is started from CAM
The current application will change immediately. This is only supported when running interactively. It is not supported in batch mode.
The argument is an application button name as specified and registered in a Menuscript file. For example specify UG_APP_MODELING to enter the modeling application. Created in NX10.0.0 License requirements: None.
"The NXOpen API has access to all objects even from gateway."
Assuming the proper license is available for use.
Yes, and I'm not switching NX modules only because I want to, but because if I get back to my primary prt (without switching NX modules at all) - my CAM session is somehow broken.
There is CAM Operation Navigator missing... And if I for example click Verify - NX will switch to Gateway. Strange - and that is the reason that I want to switch to Gateway from Manufacturing, before is start cycling trough part files. And when I finish, switch back to Manufacturing.
Parts which I'm cycling trough, don't have CAM setup initialized, so I want to do it in Gateway.