- Messages
- 12
- Country
I'm a noob to XML programming and have been trying to create a gauge for my A/C.
Please look at the code snippet( also attached as txt file).
Creating the variable(LVAR) name itself dynamically and accessing it seems impossible.
Is my requirement even possible?
(Background: Have written lots of code in LUA and badly need to pass strings (as ascii ) to LUA through these LVARS)
Thanks in advance
<?xml version="1.0" encoding="utf-8" ?>
<Gauge Name="test" Version="1.0">
<Macro Name="idd">@2 (>L:Test_@1,number)</Macro>
<Update Frequency="16">
<!-- Code works with static numbers-->
@idd(1, 400)
@idd(2, 500)
@idd(3, 600)
<!-- Code does not work with variables ( L1, L2, L3)-->
1 sp1
2 sp2
3 sp3
@idd(l1, 100)
@idd(l2, 200)
@idd(l3, 300)
</Update>
<Element >
<Position X="00" Y="0"/>
<FormattedText X="300" Y="900" Font="Arial" FontSize="24" LineSpacing="25" BackgroundColor="white" Color="blue" Bright="Yes" >
<String>
LVars value:\n
Test_1 value:
%((L:Test_1, number))%!d!\n
Test_2 value:
%((L:Test_2, number))%!d!\n
Test_3 value:
%((L:Test_3, number))%!d!\n
</String>
</FormattedText>
</Element>
</Gauge>
Please look at the code snippet( also attached as txt file).
Creating the variable(LVAR) name itself dynamically and accessing it seems impossible.
Is my requirement even possible?
(Background: Have written lots of code in LUA and badly need to pass strings (as ascii ) to LUA through these LVARS)
Thanks in advance
<?xml version="1.0" encoding="utf-8" ?>
<Gauge Name="test" Version="1.0">
<Macro Name="idd">@2 (>L:Test_@1,number)</Macro>
<Update Frequency="16">
<!-- Code works with static numbers-->
@idd(1, 400)
@idd(2, 500)
@idd(3, 600)
<!-- Code does not work with variables ( L1, L2, L3)-->
1 sp1
2 sp2
3 sp3
@idd(l1, 100)
@idd(l2, 200)
@idd(l3, 300)
</Update>
<Element >
<Position X="00" Y="0"/>
<FormattedText X="300" Y="900" Font="Arial" FontSize="24" LineSpacing="25" BackgroundColor="white" Color="blue" Bright="Yes" >
<String>
LVars value:\n
Test_1 value:
%((L:Test_1, number))%!d!\n
Test_2 value:
%((L:Test_2, number))%!d!\n
Test_3 value:
%((L:Test_3, number))%!d!\n
</String>
</FormattedText>
</Element>
</Gauge>
Attachments
Last edited: