wmcinnes

ArcScene Background Color - Harder than it should be.

Discussion created by wmcinnes on Feb 10, 2011
Latest reply on Feb 14, 2011 by wmcinnes
I'm having trouble setting the background color in ArcScene

I can "set" the backroundcolor i.e. the message box reports it as being changed, but it doesn't change in the scene.

The refreshviewers method refreshes the background to white, even though the default background is something different (150,0,150)

In the GUI, this code does set the combobox background color to grey (128,128,128)
but it doesn't apply.

Code attached below.

How do I get the background to change?

Public Sub ChangeBackground()

    Dim pSxDoc As ISxDocument
    Set pSxDoc = ThisDocument

    Dim pViews3d As IViewers3D
    Set pViews3d = pSxDoc.Scene.SceneGraph
    
    Dim r As Single
    Dim g As Single
    Dim b As Single
    
    pViews3d.SetBackgroundColor 128, 128, 128
    pViews3d.GetBackgroundColor r, g, b
      
    MsgBox r & g & b
    
    pViews3d.RefreshViewers

End Sub


End Sub

Cheers,

Will

Outcomes