plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

Ariebaba avatar image
Ariebaba asked Ariebaba answered

How to use ASOBO_INSTRUMENT_Needle_Torque_Template for two engines

I have the follow code but the torque needle of engine 2 reacts to simvar ENG TORQUE:1

<Component ID="TORQUE_POINTER_1" NODE="INSTRUMENT_Needle_Torque_1">
<UseTemplate Name="ASOBO_INSTRUMENT_Needle_Torque_Template">
<ANIM_NAME>TORQUE_POINTER_1</ANIM_NAME>
<SIMVAR>ENG TORQUE:1</SIMVAR>
<MIN_VALUE>420</MIN_VALUE>
<MAX_VALUE>2360</MAX_VALUE>
<Parameters>
<ID>1</ID>
</Parameters>
</UseTemplate>
</Component>
<Component ID="TORQUE_POINTER_2" NODE="INSTRUMENT_Needle_Torque_2">
<UseTemplate Name="ASOBO_INSTRUMENT_Needle_Torque_Template">
<ANIM_NAME>TORQUE_POINTER_2</ANIM_NAME>
<SIMVAR>ENG TORQUE:2</SIMVAR>
<MIN_VALUE>420</MIN_VALUE>
<MAX_VALUE>2360</MAX_VALUE>
<Parameters>
<ID>2</ID>
</Parameters>
</UseTemplate>
</Component>

What am I missing? Thx for any help.

gaugesanimation
1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

<ID>2</ID> it is
have you tried to read ENG TORQUE:2 value with SimConnect? maybe it's variable issue
you can try to remove <SIMVAR>ENG TORQUE:2</SIMVAR> as it already used by template

0 Likes 0 ·

1 Answer

·
Ariebaba avatar image
Ariebaba answered

Thank you very much for your reaction. I solved it. I studied the kingair xml and learned a few thinks. For one I can put multiple instruments in one component :-) I changed my code to the following and now it works.

<Component ID="TORQUE_POINTER">
<UseTemplate Name="ASOBO_INSTRUMENT_Needle_Torque_Template">
<ID>1</ID>
<NODE_ID>INSTRUMENT_Needle_Torque_1</NODE_ID>
<ANIM_NAME>TORQUE_POINTER_1</ANIM_NAME>
<!--<SIMVAR>ENG TORQUE:1</SIMVAR>-->
<MIN_VALUE>420</MIN_VALUE>
<MAX_VALUE>2360</MAX_VALUE>
</UseTemplate>
<UseTemplate Name="ASOBO_INSTRUMENT_Needle_Torque_Template">
<ID>2</ID>
<NODE_ID>INSTRUMENT_Needle_Torque_2</NODE_ID>
<ANIM_NAME>TORQUE_POINTER_2</ANIM_NAME>
<!--<SIMVAR>ENG TORQUE:2</SIMVAR>-->
<MIN_VALUE>420</MIN_VALUE>
<MAX_VALUE>2360</MAX_VALUE>
</UseTemplate>
</Component>


10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.