Here's a very simple macro I use to change (toggle) the backgound color (non-gradient) quickly when I save new library features, etc. I hate how the colored backgound appears when I use the design library but also despise working with a white background.
' ****************************************
' Viewport Background Toggle.swb
' ****************************************
Dim swApp As Object
Dim swDoc As Object
Dim nCurrentColor As Long
Sub main()
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
nCurrentColor = swApp.GetUserPreferenceIntegerValue(swSystemColorsViewportBackground)
'swApp.SendMsgToUser (nCurrentColor)
If nCurrentColor = 16777215 Then
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 14155261
Else
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 16777215
End If
swDoc.GraphicsRedraw2
End Sub
A simple modification can be made to the above in order to use the gradient feature.
Remember...
[navy]"If you don't use your head,[/navy]
![[idea] [idea] [idea]](/data/assets/smilies/idea.gif)
[navy]your going to have to use your feet."[/navy]