Showing results for 
Search instead for 
Do you mean 

Change workpart background color

Dear community,


I am looking for a way to set the background color of the workpart to plain and a fixed color, e.g. RGB(200,200,200) (Greyscale).


It has to happen in the Shaded with edges mode, which I already can set via this code.


workPart.ModelingViews.WorkView.RenderingStyle = NXOpen.View.RenderingStyleType.ShadedWithEdges


But I didn't find any way to change the background color, which seems a bit odd. Something so simple cannot be changed via nxOpen?


I tried the following code, I don't get an error but there is also nothing happing. But Scaleadjustment, Fit and ShadeWithEgdes work.


Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
    Sub Main(ByVal args() As String)

        Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
        Dim workPart As NXOpen.Part = theSession.Parts.Work
        Dim displayPart As NXOpen.Part = theSession.Parts.Display
        Dim backGround As NXOpen.Display.Background
        Dim topcolor As Double() = {1.0, 1.0, 1.0}
        Dim bottomColor As Double() = {1.0, 1.0, 1.0}

        workPart.ModelingViews.WorkView.Orient(NXOpen.View.Canned.Isometric, NXOpen.View.ScaleAdjustment.Current)
        workPart.ModelingViews.WorkView.RenderingStyle = NXOpen.View.RenderingStyleType.ShadedWithEdges

        backGround = workPart.Views.CreateBackground(workPart.Views.WorkView, False)
        backGround.BackgroundType = (NXOpen.Display.Background.Type.Plain)


    End Sub
End Module


Looking forward to a response.


Kind regards




Re: Change workpart background color

The "background" object that you created is only for use with the "studio" shaded mode and high quality rendering, it does not affect the shaded or wireframe background. To the best of my knowledge, there is no way to change the shaded or wireframe background color through the API. I'd suggest contacting GTAC and opening an enhancement request (ER).

Re: Change workpart background color



okay thank you for the reply.


I did not find any email.


Is this the right page?


Kind regards



Re: Change workpart background color is the correct page to enter problem reports and such.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 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

Re: Change workpart background color

Thank you very much for the link.