Autodesk Inventor Engineer-to-Order
- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Change text color through <StyleOver ride>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How can I change text color using <StyleOverride>?
Thanks in advance.
Xeon X5647
24 Gb RAM
Quadro FX 6000
Inventor 2013
ETO 6.1, Build 140.
Re: Change text color through <StyleOver ride>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
You did not mention the type of the Inventor object you wanted to apply the Color to.
If the object is under Intent control, try the following:
1. Call GetHostObject() to step from Intent Part to Inventor object
2. Use the .Color setter on that object.
Alex Korzun
Principal Engineer
Inventor Engineer-to-Order
Re: Change text color through <StyleOver ride>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I'm talking about standard design as :IvGeneralNote.
Xeon X5647
24 Gb RAM
Quadro FX 6000
Inventor 2013
ETO 6.1, Build 140.
Re: Change text color through <StyleOver ride>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I don't believe this is possible via StyleOverride
Looking at the Inventor API help there is a list of the options that are available via StyleOverride
mk:@MSITStore:C:\Users\farren.young\Desktop\Invent
Style Override <StyleOverride>
The StyleOverride tag defines all text style information. The various style options are defined within the tag using attributes. These attributes are described below.
Font – Sets which font to use. The input to this attribute is the name of the font.
FontSize – Sets the size of the font. The input to this attribute is the size in centimeters.
Bold – Allows you to turn bolding on or off. The input to this attribute is the String "True" or "False".
Italic – Allows you to turn italics on or off. The input to this attribute is the String "True" or "False".
Underline – Allows you to turn underlining on or off. The input to this attribute is the String "True" or "False".
As Alex mentioned, you will need to override the color property of your object.
To get the color you have to create it using the inventor application transientobjects class.
gethostobject(me).set_color(%%inventorapplication.
************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Re: Change text color through <StyleOver ride>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I found best way, I think so.
Just use Style for Note Text.
Xeon X5647
24 Gb RAM
Quadro FX 6000
Inventor 2013
ETO 6.1, Build 140.

