cancel
Showing results for 
Search instead for 
Did you mean: 

Is there API for background settings?

Creator
Creator

Hi!

 

A background in NX view can be changed by Menu -> Preferences -> Background... window.

 

How do I extract those settings (plane/graduated, top color, bottom color) using "NXOpen" or "UF" API?

 

Thank you!

 

P.S.

For regular display mode, not "Studio"

15 REPLIES

Re: Is there API for background settings?

Phenom
Phenom

The last time I looked for background settings, there were no API commands that gave access to the shaded/wireframe graduated background colors in modeling. You can set the plain background color using {UFSession}.Disp.SetColor(...) to change the "background color" in the CDF then .LoadColorTable to make the change.

Re: Is there API for background settings?

Genius
Genius

Here is the link to a GTAC VB.Net example (nx_api4577) that may help you

 

https://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api4577

Re: Is there API for background settings?

Phenom
Phenom

Note that the GTAC example only works for the "studio" display mode and not the regular display mode.

Re: Is there API for background settings?

Creator
Creator

Thank you, but I need the regular display mode, not "Studio"

Re: Is there API for background settings?

Esteemed Contributor
Esteemed Contributor

Have you tried recording a journal?

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Is there API for background settings?

Creator
Creator
Yes, of course I tried.

It doesn't support logging to journal

Re: Is there API for background settings?

You might look at visualization settings templates, in case you can restore a template with a journal. https://docs.plm.automation.siemens.com/tdoc/nx/11.0.2/nx_help/#uid:xid1128416:index_customizing_nx:...

Mark Rief
Retired Siemens

Re: Is there API for background settings?

Phenom
Phenom

also looking for info on setting the background via shortcut. I would like to do that in any file (.sim, .fem, .prt)

I have in mind a "switch" black/white. if backround is black set it to white, if white set it to black.

 

Can one "detect" the current color of the background?

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Is there API for background settings?

Phenom
Phenom

"Can one "detect" the current color of the background?"

 

I don't know of any currently available method that will get you this information. At least not for the normal shaded/wireframe view in the modeling application.