ShowRasterImage Example |
Using Programming Languages other than VBA
Sub Example_ShowRasterImage() ' This example returns the current setting of ' ShowRasterImage. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currShowRasterImage As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current ShowRasterImage value currShowRasterImage = preferences.DISPLAY.ShowRasterImage MsgBox "The current value for ShowRasterImage is " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" ' Change the value for ShowRasterImage preferences.DISPLAY.ShowRasterImage = Not (currShowRasterImage) MsgBox "The new value for ShowRasterImage is " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" ' Reset ShowRasterImage to its original value preferences.DISPLAY.ShowRasterImage = currShowRasterImage MsgBox "The ShowRasterImage value is reset to " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" End Sub
Comments? |