Background image

Background image

Anonymous
Not applicable
470 Views
3 Replies
Message 1 of 4

Background image

Anonymous
Not applicable
Hi there.
I'm trying to make a simple macro to change back to my standard desktop background image.

I have come this far with my limited macro knowledge:

Public Sub Revertbackground()

ThisApplication.ColorSchemes.BackgroundType = kImageBackgroundType
ThisApplication.ColorSchemes.Item.ImageFullFileName.......

End Sub

Can anyone help me with the functionality of ImageFullFileName?


Kjetil
0 Likes
471 Views
3 Replies
Replies (3)
Message 2 of 4

ludesroc
Advocate
Advocate
Public Sub Revertbackground()

' Change the background type.
ThisApplication.ColorSchemes.BackgroundType = kImageBackgroundType

' Set the backgroud picture (Ex: Cloud).
ThisApplication.ActiveColorScheme.ImageFullFileName = "C:\Program Files (x86)\Autodesk\Inventor 2008\Backgrounds\Cloud2.bmp"

End Sub

Ludesroc.
Ludesroc
Message 3 of 4

Anonymous
Not applicable
Superb.

Thanks

Kjetil
0 Likes
Message 4 of 4

Anonymous
Not applicable

Here is a little trick how to set white Backgroung (for PrintSrceen for example) without changing ohter colour settings (like lines on the sketch):

 

Public Sub Background_Image()
ThisApplication.ActiveColorScheme.ImageFullFileName = "C:\Program Files (x86)\Autodesk\Inventor 2014\Backgrounds\white.png"
If ThisApplication.ColorSchemes.BackgroundType = kImageBackgroundType Then ThisApplication.ColorSchemes.BackgroundType = kGradientBackgroundType Else ThisApplication.ColorSchemes.BackgroundType = kImageBackgroundType End If Run_CMD ("AppAmbientShadowCmd") End Sub Function Run_CMD(ByVal cmd As String) As Boolean ' Get the CommandManager object. Dim oCommandMgr As CommandManager Set oCommandMgr = ThisApplication.CommandManager ' Get control definition for the line command. Dim oControlDef As ControlDefinition Set oControlDef = oCommandMgr.ControlDefinitions.Item(cmd) ' Execute the command. Call oControlDef.Execute End Function

My whie.png file is all white as you can imagine.

 

good luck

0 Likes