Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Background image

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
382 Views, 3 Replies

Background image

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
3 REPLIES 3
Message 2 of 4
ludesroc
in reply to: Anonymous

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
in reply to: Anonymous

Superb.

Thanks

Kjetil
Message 4 of 4
eljoseppo
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report