NXOpen automating changing background colour and graduation
NXOpen automating changing background colour and graduation
(OP)
Hello NXers,
We are upgrading from NX4 to NX10 and all the existing files have black backgrounds, white as the selection colour and the old colour palettes.
I am doing a journal to change these in one operation. The current look is a bit too 90s AutoCAD.
This previous post discusses this: thread561-246693: NXOpen Automating switching to Plain background?
This NXOpen class looks promising: NXOpen.Display.Background.BackgroundType = Background.Type.Graduated;
My question is how do I get the instance of the current Display class object? I need that object to call the function above.
From the BasePart.Views() ViewCollection? Does the Part or the ViewCollection own the Display object?
Thanks
Paul
We are upgrading from NX4 to NX10 and all the existing files have black backgrounds, white as the selection colour and the old colour palettes.
I am doing a journal to change these in one operation. The current look is a bit too 90s AutoCAD.
This previous post discusses this: thread561-246693: NXOpen Automating switching to Plain background?
This NXOpen class looks promising: NXOpen.Display.Background.BackgroundType = Background.Type.Graduated;
My question is how do I get the instance of the current Display class object? I need that object to call the function above.
From the BasePart.Views() ViewCollection? Does the Part or the ViewCollection own the Display object?
Thanks
Paul
Paul Turner
CAD & Process Engineer
Mastip Technology





RE: NXOpen automating changing background colour and graduation
CODE -->
So I'm not sure its exactly what you're looking for.
Graham Inchley, Systems Developer, Sandvik Coromant. www.sandvik.com
HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
RE: NXOpen automating changing background colour and graduation
Thanks for the reply.
I need an object reference to be able to set its BackgroundType.
I can't just call:
So my question is how do I get the object reference for the current display?
Paul Turner
CAD & Process Engineer
Mastip Technology
RE: NXOpen automating changing background colour and graduation
To set the background type this is what I did:
CODE --> Java
Simple modelling views are not affected.
Looking at the other thread you referenced I can set the background color for normal model views using the wrapper for
UF_DISP_set_color(), but it only changes it for 'Plain' backgrounds. If the view background is 'Graduated' the change is
not seen:
CODE --> Java
Graham Inchley, Systems Developer, Sandvik Coromant. www.sandvik.com
HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5