Jump to content

Assign value of custom name variable to another variable


Recommended Posts

Hello

 

Is it possible to get a value of a custom name variable and to assign it to another internal variable?

 

 

1) A simple example

 

In the below example I'm trying to add more options (COM and NAV frequencies) to the FCU selector based on a switch up on Bravo. At the same time I want to keep the original FCU_SELECTOR values (ALT, VS...) when the switch is down.

 

First a switch has a Press Event

Variable: CUSTOM NAME

Name: INT:MYVAR_RADIO, string

Index:

Value: COM1

 

Then I try to assign the value of MYVAR_RADIO, which is "COM1", to FCU_SELECTOR

 

Please login to display this image.

 

 

2) The same, but with an array

 

First a switch has a Press Event

 

Variable: CUSTOM NAME

Name: INT:MYVAR_RADIO, string

Index: 0

Value: COM1

 

Variable: CUSTOM NAME

Name: INT:MYVAR_RADIO, string

Index: 1

Value: COM2

 

Variable: CUSTOM NAME

Name: INT:MYVAR_RADIO, string

Index: 2

Value: NAV1

...

 

Can I then assign the value of an array variable to FCU_SELECTOR e.g. (in this case the 2nd array element with value "COM2"

 

Please login to display this image.

 

 

Thank you for any pointers.

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

  • 1 month later...

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy & Terms of Use