Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Colour Scheme Toggle

15 REPLIES 15
Reply
Message 1 of 16
KaufmanHome
1212 Views, 15 Replies

Colour Scheme Toggle

Just something I wanted for a while and finally did something.

 

CurrentColourScheme = ThisApplication.ActiveColorScheme.Name

If CurrentColourScheme = "High Contrast" Then
    ThisApplication.ColorSchemes("Presentation").Activate
        'MsgBox("Current colour scheme is now Presentation")
Else ThisApplication.ColorSchemes("High Contrast").Activate 'MsgBox("Current colour scheme is now High Contrast ")
End If 'Also possible,'ThisApplication.ColorSchemes(5).Activate
15 REPLIES 15
Message 2 of 16
JDMather
in reply to: KaufmanHome

Looks interesting - how do I use this?


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 3 of 16


@Anonymous wrote:

Looks interesting - how do I use this?


Hi JDMather,

 

To use this code first create an iLogic Rule:

  1. On the ribbon, click Manage tab > iLogic panel > Add Rule button.
  2. Name the new rule Colour Scheme Toggle
  3. In the rule text area of the Edit Rule dialog box, simply paste in the code from above.
  4. Click OK to save (and run) this new rule.

 

This will have created the rule only in the current file though. To have it avaliable to run at anytime, you can re-create the rule as an external rule:

http://autodeskmfg.typepad.com/blog/2012/01/working-with-external-ilogic-rules.html

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 4 of 16

Just to note I use this within a printing rule such that I can print a screen shot with a white background all in one mouse click.

Message 5 of 16
JDMather
in reply to: KaufmanHome

I create a lot of documentation for my classes that I prefer to have a white (Presentation) background, but I do not normally work with a white background.  I am looking forward to testing this out.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 6 of 16

Nice one, this has been a fair way down my todo list for a while. Glad you beat me to it!

 

Any idea how to change the Background from '1 Color' to 'Gradient' as well? I couldn't see that setting in the API, I suspect you might have to control the Top and Bottom colors directly... Any suggestions?

Message 7 of 16
-niels-
in reply to: KaufmanHome

Just wondering, as i don't have to change the color scheme that often, but i normally use a scheme with an image background and when i switch to the white presentation scheme i also have to set the background to 1 color.
Would it be possible to automate that with ilogic as well?

Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands

Message 8 of 16
blair
in reply to: -niels-

I just use the Cool Orange Screen Grab from the ADSK App Store. Allows for a number of features such as white background, saving to file or printing. Screen capture or window select.


Inventor 2020, In-Cad, Simulation Mechanical

Just insert the picture rather than attaching it as a file
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Delta Tau Chi ΔΤΧ

Message 9 of 16
SteveMDennis
in reply to: blair

Hi Guys,

 

 Can you tell me what scenarios you would want to use this color scheme toggle rule?

 

We are looking at formalizing (getting it out of the SDK) the color scheme editor and I want to see if there is any synergy here with this thread...

 

Oops just saw @KaufmanHome use for it, missed it on first read.  @JDMather @Curtis_Waguespack any other workflow where this is valuable?



Steve Dennis
Sr. Principal Engineer
Inventor
Autodesk, Inc.

Message 10 of 16
mcgyvr
in reply to: SteveMDennis

@SteveMDennis

I normally use Winter Day (hacked a bit with the ICE tool..and good to hear its coming out into the day light)..

But I switch to Presentation (for the white background) all the time when doing raytracing to save out images for the marketing department here..

 

I just switch to Presentation..Raytrace then use Snipping Tool in windows to grab what I want..

 

I'd like to see an application option where when I press Enable raytracing that it did that automatically for me though.. 

Maybe this.. 

RaytraceScheme.PNG



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 11 of 16
SteveMDennis
in reply to: mcgyvr

Instead of an application option how about an iLogic rule that fires when you enable/disable ray tracing then you could use code like the OP to switch automatically?



Steve Dennis
Sr. Principal Engineer
Inventor
Autodesk, Inc.

Message 12 of 16
mcgyvr
in reply to: SteveMDennis


@SteveMDennis wrote:

Instead of an application option how about an iLogic rule that fires when you enable/disable ray tracing then you could use code like the OP to switch automatically?


Well.. Sure.. That would be "ok" for some.

I just though you were fishing for stuff to actual improve Inventor for any user.

ilogic/rules is not for everyone IMO..

 

I LOVE application options/document settings/style library I'm 100% for EVERYTHING being there.. Not a big fan of this "persistent across X" stuff thats being done now.. or functionality not even giving me the chance to turn it on/off.. 

 

 

One I'm running into now is that EVERY base view I place has the shaded box selected.. I will NEVER do a shaded drawing yet every drawing I need to uncheck that..

Do you know what I need to do to stop that? 

 

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 13 of 16


@SteveMDennis wrote:

 

 Can you tell me what scenarios you would want to use this color scheme toggle rule?

 

any other workflow where this is valuable?


Here are a few scenarios I've encountered:

 

scenario1:

User A drives a tricked out sub compact car with $8000 of custom decals, spoilers, wheels, and seat covers. He has blue highlights in his hair, and everyday somebody dresses him funny. Let's just say he likes to customize things and stand out from the crowd. So he uses a High Contrast scheme with a back ground image of a squirrel... (maybe? or ferret? ) , armed with nun chucks and is fighting a dragon. Not my thing, but for the most part I don't care. That is unless he needs help with a sketch. Then after 5 minutes spent determining that he has a lock constraint on a construction line that is causing the problem, I walk away in a psychedelic daze and wake up behind a Target store 3 days later wearing a kilt and carrying a garden gnome.

 

So I like to toggle to a known, comfortable (for me), color scheme when helping users, and I or they, can toggle it back to whatever they had before when I'm done.

 

scenario2:

I'm presenting "a lunch and learn" on a projector in a conference room where the light isn't great (too bright). A white background works great, but yellow lines get lost, so I have a custom color scheme. User B presents next week and uses whatever color scheme she likes and no one can see anything. When this is pointed out, she get's flustered and the presentation gets rocky. The week after that, User C presents, and we have a 10 minute discussion of color schemes again, because everybody is tired of trying to decipher the colors each week. If only there was a quick toggle to an agreed upon "company" color scheme...

 

scenario3:

User D has vision disabilities and none of the current scheme work well for him, so he's customized his scheme. But then when referring to his screen when asking others about design questions, he has to hear the same tired comments about his color scheme, which relates to his disability. With a quick toggle he could reduce the number of comments he receives on this, and the HR department could relax a bit. (note: some ability to tie the App Options > Sketch > Annotation Size to a color scheme would be helpful here also).

 

scenario4:

I maintain a classroom with 12 workstations. When the users change the color schemes, the "green line" I'm talking about in class, is purple on their screen. Not s huge deal when they know they set it that way, but when someone else comes along and uses that machine... A toggle to reset would help here as well. (a side conversation about locking some App Options for classroom settings could be had here as well.)

 

scenario5:

I create Inventor documentation such as books, blogs, videos, company library files (think Inventor file thumbnails) and so on. It would be nice to have a toggle to use for this when a lot of screen capturing is taking place, vs. when doing normal work. 

Message 14 of 16
Curtis_Waguespack
in reply to: mcgyvr


@mcgyvr wrote:

@SteveMDennis

I normally use Winter Day (hacked a bit with the ICE tool..and good to hear its coming out into the day light)..

But I switch to Presentation (for the white background) all the time when doing raytracing to save out images for the marketing department here..

 

I just switch to Presentation..Raytrace then use Snipping Tool in windows to grab what I want..

 

I'd like to see an application option where when I press Enable raytracing that it did that automatically for me though.. 

Maybe this.. 

 


The ability to use Alpha Channel for a background so that we have no background color would be useful also, not sure if that would be within the scope of this color schemes or not.

 

pic6_33517

Message 15 of 16
Curtis_Waguespack
in reply to: -niels-


@-niels- wrote:
Just wondering, as i don't have to change the color scheme that often, but i normally use a scheme with an image background and when i switch to the white presentation scheme i also have to set the background to 1 color.
Would it be possible to automate that with ilogic as well?

Hi -niels-, 

This will toggle from a one color background to using an image or vice versa.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

oSchemes = ThisApplication.ColorSchemes

If oSchemes.BackgroundType = BackgroundTypeEnum.kOneColorBackgroundType Then
	'set to use image
	oSchemes.BackgroundType = BackgroundTypeEnum.kImageBackgroundType
Else
	'set to use 1 color
	oSchemes.BackgroundType = BackgroundTypeEnum.kOneColorBackgroundType
End If

 

Message 16 of 16


@gerrarddhickson wrote:

 

Any idea how to change the Background from '1 Color' to 'Gradient' as well? I couldn't see that setting in the API, I suspect you might have to control the Top and Bottom colors directly... Any suggestions?


Hi gerrarddhickson,

 

This toggles from 1 color to gradient.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

oSchemes = ThisApplication.ColorSchemes

If oSchemes.BackgroundType = BackgroundTypeEnum.kOneColorBackgroundType Then
	'set to use image
	oSchemes.BackgroundType = BackgroundTypeEnum.kGradientBackgroundType
Else
	'set to use 1 color
	oSchemes.BackgroundType = BackgroundTypeEnum.kOneColorBackgroundType
End If

 

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

Post to forums  

Autodesk Design & Make Report