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.1, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0 Preparing: NX12.0
Employees of the customers, together we are strong
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 | KF
Production: [NX22.214.171.124 MP11 64bit] Testing: [NX126.96.36.199 MP5] & [NX188.8.131.52 MP1]