Changing Background color and visual style with iLogic

Changing Background color and visual style with iLogic

SveinnIngi
Contributor Contributor
3,920 Views
4 Replies
Message 1 of 5

Changing Background color and visual style with iLogic

SveinnIngi
Contributor
Contributor

An Inventor file published an .jpeg image when running an iLogic Rule. Multible users with different templates are executing this but I want a uniform output.

 

This code at top of the rule was a game changer for me (Kudos to Curtis).

 

'Return view to Home view

ThisApplication.CommandManager.ControlDefinitions.Item _

("AppViewCubeHomeCmd").Execute

 

'zoom all

ThisApplication.ActiveView.Fit

 

 http://inventortrenches.blogspot.is/2012/01/autodesk-inventor-ilogic-sort-browser.html

 

 

-> I would also like to change Color scheme, Background and Visual Style within the same rule.

 

Is this possible?

 

Regards,

Sveinn 

 

 

 

 

0 Likes
Accepted solutions (1)
3,921 Views
4 Replies
Replies (4)
Message 2 of 5

mcgyvr
Consultant
Consultant
Accepted solution

Some stuff here

https://forums.autodesk.com/t5/inventor-customization/ilogic-change-background-colour/td-p/5823608

 



-------------------------------------------------------------------------------------------
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 3 of 5

SveinnIngi
Contributor
Contributor

Thank you for a super quick reply mcgyvr! This helped. I also found this stuff:

https://forums.autodesk.com/t5/inventor-customization/ilogic-code-for-visual-styles-shaded-with-edge...

 

...and ended up with this code:

 

Dim oView As View = ThisApplication.ActiveView
oView.DisplayMode = DisplayModeEnum.kShadedWithEdgesRendering
oView.Update

ThisApplication.ColorSchemes.Item("Presentation").Activate
ThisApplication.ColorSchemes.BackgroundType = 52737

'Return view to Home view
ThisApplication.CommandManager.ControlDefinitions.Item _
("AppViewCubeHomeCmd").Execute

'zoom all
ThisApplication.ActiveView.Fit

ThisDoc.Document.SaveAs(ThisDoc.Path &"/" &MCode &"_" &ConveyorID & ".jpg" , True)

 

...Which works for me and I go happy into the weekend! Thank's.

Message 4 of 5

yuvraj.dhinjal
Explorer
Explorer

I am a new user to Inventor. Is there any easy way to change the background color?

 

I have used NX before and it very easy to change the background color.

 

Thanks

0 Likes
Message 5 of 5

Curtis_Waguespack
Consultant
Consultant

Hi @yuvraj.dhinjal


Welcome to the forum. 

 

See this video for the basics of how to change the background color in Inventor.

 

Also here is a related link:

http://inventortrenches.blogspot.com/2012/09/inventor-background-color-as-white.html

 

Note that your question is a bit different from the original question of this discussion topic. Just for consideration in the future, please know that it is generally preferred that you start a new topic, rather than append your additional question to an existing topic, unless the topics are the same.

 

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

 

 

 

 

EESignature

0 Likes