Reply
Solved! Go to solution

Change balloon color

Hi there,

 

Is there a way to change the balloon text color in a draft sheet programmaticaly?

 

What i want to do is to change the color of the balloon depending of the value of the text inside.

 

I'm on ST6 MP8 and VB 2010.

 

Best regards.

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET
5 REPLIES
Solution
Solution
Accepted by topic author Hector
‎08-26-2015 04:32 AM

Re: Change balloon color

Hi Hector,

 

You can use the following property of a Balloon object:

 

oBalloon.Style.DrivenColor

 

to change the color. Its an integer.

Some common colors that can be used are:

Default = 8421376
Red = 255
Green = 65280
Blue = 16711680
White = 16777215
Magenta = 16711935
Orange = 33023

 

Hope you find this useful.

 

Regards,

Tushar Suradkar

http://surfandcode.blogspot.in

http://www.cadvertex.com

 

Re: Change balloon color

Works fine!

Thanks
Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change balloon color

[ Edited ]

To convert color to integer
C
Dim ecolor as color = color.blue
Dim icolor as integer= colortranslator.towin32 (ecolor)

 

Edited:

 

To convert integer to color

Dim intcolor as integer = 1123455

Dim wincolor as color = colortranslator. Fromwin32 (intcolor)

 

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change balloon color

Thanks for the snippet, I was looking for a way to convert SE colors to real ones for years but was afraid to ask Smiley Happy

~Tushar

 

Re: Change balloon color

I want to set text position as Above...

I have set using code but It won't reflect....Please suggest...