Sign in to follow this  
Guest Patrick_Waugh

Exchanging variables between C gauges and XML gauges

Recommended Posts

Hi, Sorry if this has been asked before but I have searched and not found the answer. Could anyone help me by giving example code of how to share variables between C and XML gauges. This is to allow complex calcs to be performed in C code and the results used in an XML gaugeMany thanks

Share this post


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

>Hi, >Sorry if this has been asked before but I have searched and>not found the answer. >>Could anyone help me by giving example code of how to share>variables between C and XML gauges. This is to allow complex>calcs to be performed in C code and the results used in an XML>gauge>>Many thankshttp://forums.flightsim.com/dc/dcboard.php...sg_id=233&page=

Share this post


Link to post
Share on other sites

Thanks for the reference to my "mini-tip" Patrick!I've just added a "Part 2" to the post explaining how to use the execute_calculator_code(); function as an alternative method. :)

Share this post


Link to post
Share on other sites

Many thanks for the rapid replies guy's. I'm sure I'll crack this now.CheersDoug

Share this post


Link to post
Share on other sites

Just read part 2 Bill, but not sure what you are trying to tell people when you say:

Note that the same structure may be made bi-directional, meaning that you can use XML to control the C variable, or use the C variable to control the XML variable.
as that function call will copies XML vars to the variable at the specified pointer, but not the reverse.If you are refering to Part I above, then you might want to make that clearer for the noobs. =)But who knows, maybe I have forgot something. =)Anyway, glad to point out your excellent tips that you took the time to make.

Share this post


Link to post
Share on other sites

>If you are refering to Part I above, then you might want to>make that clearer for the noobs. =)Thanks. That'll teach me to try writing a coherent explanation that early in the morning when I'm still barely awake! ;)BTW, if you ever feel like posting a "tip", it'd be most welcome.While this forum is much busier, at least "over there" I have some control over the posts, and can easily collate tips into a more digestable form for quicker reference. ;)

Share this post


Link to post
Share on other sites

Will do. Yes, it is a great place for that given that you can sticky them etc.Patrick

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