TheSwamp

Code Red => VB(A) => Topic started by: hardwired on May 29, 2008, 10:23:02 AM

Title: Block Editor background colour..
Post by: hardwired on May 29, 2008, 10:23:02 AM
Hi,

I have this code that toggles the ModelSpace background colour so i can quickly swap between black and white. I also have the same but for PaperSpace colour...


Code: [Select]
'*** THIS PROGRAM CHANGES THE MODELSPACE BACKGROUND COLOUR ***
Sub MS_BG()
Dim pref As AcadPreferences  ' Background colour preference..
Set pref = ThisDrawing.Application.Preferences 'Set preferences variable..
If pref.Display.GraphicsWinModelBackgrndColor = vbWhite Then
        pref.Display.GraphicsWinModelBackgrndColor = vbBlack
        pref.Display.ModelCrosshairColor = vbWhite
ElseIf pref.Display.GraphicsWinModelBackgrndColor = vbBlack Then
        pref.Display.GraphicsWinModelBackgrndColor = vbWhite
        pref.Display.ModelCrosshairColor = vbBlack
End If
End Sub
'*************************************************************

.....what i want to know, as i can't find it and there doesn't seem to be a property for it in VBA......how can i toggle the Block Editor background colour?