Sign in to follow this  
Guest bartels

Dynamic SCALE in XML possible ??

Recommended Posts

In the XML code:(G:Var1)I want to use a dynamic SCALE instead of a static value.I.o.w., read the Scale value from a variable instead of the numerical value "4.9".However, using gives an XML parsing error.Any suggestions ??Thanks, Rob Barendregt

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Tried?It might not work at all. WithColor="%((L:EICAS lamp bright,number) 0x7f + 0x100 * )%"I got at last a dimmable String.Arne Bartels

Share this post


Link to post
Share on other sites

Tried that too but no luck.doesn't give a syntax error, but always give Scale value "0".Rob

Share this post


Link to post
Share on other sites

Color="%((L:EICAS lamp bright,number) 0x7f + 0x100 * )%"Hi Arne, very interesting. This works great. Gives green as the colour. Is there a way to chose different colours?Nick.

Share this post


Link to post
Share on other sites

Any colour you want (RGB). It might have been simpler to understand by using something like:Color="%( 0x00ff00 (L:brightness,number) * near )%"With (L:brightness,number) between 0.0 (dark) and 1.0 (full lit). 0x00ff00 the RGB colour value (0xff = 255 for green part, 0 for the others).Arne Bartels

Share this post


Link to post
Share on other sites

I suspected something like this, some parameters are simply not dynamical. After all you can try to use and do a bit of trickery in the corresponding line.Arne Bartels

Share this post


Link to post
Share on other sites

Actually I also needed it for the "X" and "Y" position, for which it doesn't work either.But as you said: it can all be easily solved by including correct scale and offset calculation in the line.Why didn't I think of that ???Sometimes solutions are just too trivial :-) :-)Thanks for the help.Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Arne,I'm producing zero to one using a slider gauge with drag function, (M:X) 100 / 0 max 1 min 1 r - Adjust gauge brightness (%((L:bright,number) 100 *)%!3d!%%)@BrightClick (>L:bright,number)Color="%(0x00ff00 (L:bright,number) * near)%" works great, but the colour during drag tends to change through various shades of yellow and red. How can we keep the colour green at all brightness levels.Also, I change the line to Color="%(0xff0000 (L:bright,number) * near)%" expecting red but the text does not display. Same with 0x0000ff, expecting blue.Help!Nick.

Share this post


Link to post
Share on other sites

Trying out before posting would have been a better idea I think. Don't have the time for serious trying out though. I'm away on business the next days. Maybe you work with single "colour channels", and stick them together later? A number between 0x00 and 0xff multiplied by 0x01 is blue, multiplied by 0x100 is green, multiplied by 0x10000 is red and then adding all chennels together.Arne Bartels

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this