I'm trying to call my script from home page of NX (there are no opened parts).
self.theUI = NXOpen.UI.GetUI() self.theDlxFileName = "sblade_wizard.dlx" self.theDialog = self.theUI.CreateDialog(self.theDlxFileName)
And I have an exception: "This operation can only be done on the work part"
How to launch it without work part?
You cannot display a dialog without a open part file, this is how it works.
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
We have some toolboxes we want to run with no part, in this case we check if there is a part open before launching the dialog. If not we create a blank temporary part using a randomly generated name.
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX18.104.22.168 MP11 64bit Testing: NX22.214.171.124