SDK docs missing info on Loop - with Param, Value and Parameters

Version: *1.6.34 SDK 1.5.7

Frequency: Consistently*

Severity: *Low
(Low - quality of life, workflow optimization, rare enough to not impact production, etc…
High - critical but workarounds are available, important feature not working as expected, frequent enough to impact production
Blocker - prevents from working on the project, prevents from releasing the product)

Marketplace package name: if applicable

Context: What package? When editing or mounted from Community? In main menu or in flight? etc…

Similar MSFS 2020 issue: insert url here if applicable

Bug description:
The parameterfn “ASOBO_Flaps_Position_Indicators_Template” has the following loop XML programming.

EDIT: perhaps a better example to explain- using the DA62 sample would be

DA62_Gear_Position_Indicators_Template

		<Loop>
			<Setup>
				<Param>NODE_ID</Param>
				<Value>CONTACT_POINT_NAME</Value>
				<Parameters>
					<LoadParameters ID="CONTACT_POINT_NAMEs"/>
					<RemoveSavedParameters ID="CONTACT_POINT_NAMEs"/>
				</Parameters>
			</Setup>
			<Do>
				<UseTemplate Name="DA62_Gear_Position_Indicator_Template">
					<CONTACT_POINT_ID>'#CONTACT_POINT_NAME#'_n</CONTACT_POINT_ID>
				</UseTemplate>
			</Do>
		</Loop>

	<Loop>
		<Setup>
			<Param>NODE_ID</Param>
			<Value>FLAPS_SETTING</Value>
			<Parameters>
				<LoadParameters ID="LIGHTS_INDICES"/>
				<RemoveSavedParameters ID="LIGHTS_INDICES"/>
			</Parameters>
		</Setup>
		<Do>
			<UseTemplate Name="ASOBO_IT_Emissive_Brightness_Template">
				<UseParametersFn Name="ASOBO_Flaps_Position_Emissive_Parameters"/>
			</UseTemplate>
		</Do>
	</Loop>

I can’t find any information on this type of loop - I am having trouble deciphering it myself.

The Param I assume is same as if it was a For Loop and each time through the loop it gets set to the Value - FLAP_SETTING. - from some other Parameters Function in the Do section.

Or is the Node_ID taken from a Flap_Setting variable?

What does the Parameters section do? It gets light indices that I assume the developer has saved somewhere. (?) possibly a non sequential list of integers?

This type of loop is not explained in the SDK docs.
Repro steps:

Attachments:

Private attachments: Send a PM to @PrivateContent with the link to this topic and the link to download your content

Anyone have any clue and can explain this to me? Stumped.

or this?

isn’t there missing _n stuff and quotes??

After a week of trying to understand this Loop structure, I think I’ve figured it out.

Like the Loop with integer iteration values, with a stop check. These Loops work without a stop check. They “Do” all the variable/values pairs listed in the Parameters part.

   <Loop>
	   <Setup>
            <Param>NODE_ID</Param>
			<Value>FLAPS_SETTING</Value>
			<Parameters>
				<LoadParameters ID="LIGHTS_INDICES"/>
				<RemoveSavedParameters ID="LIGHTS_INDICES"/>
			</Parameters>
		</Setup>
		<Do>
			<UseTemplate Name="ASOBO_IT_Emissive_Brightness_Template">
				<UseParametersFn Name="ASOBO_Flaps_Position_Emissive_Parameters"/>
			</UseTemplate>
		</Do>
	</Loop>

The Param Variable “NODE_ID” is like the loop integer iteration variable. That variable holds the tag data in the Parameters part. In this case Parameters Loads the SaveParameters from LIGHTS_INDICIES. These were set in another part.
Let’s say it contains two key/value pairs (I’ll call them)

<LIGHT_Number_R>1</LIGHT_Number_R>
<LIGHT_Number_L>2</LIGHT_Number_L>

Because there are only two parameters the iteration goes through two iterations - no more, no less. It’s kinda like an array. You loop through the array.
NODE_ID in the first iteration becomes - <NODE_ID>LIGHT_Number_R</NODE_ID>
The value of the first parameter gets posted to the <VALUE> variable, where the tag is the Value of <VALUE>. In this case FLAPS_SETTING. We then have for the First loop
<FLAPS_SETTING>1</FLAPS_SETTING>

We now have our first set of variables that are used in the “Do” part. It makes the do part look like this:

          <Parameters Type="Default">
            <NODE_ID>LIGHT_Number_R</NODE_ID>
            <FLAPS_SETTING>1</FLAPS_SETTING>
          </Parameters>
			<UseTemplate Name="ASOBO_IT_Emissive_Brightness_Template">
				<UseParametersFn Name="ASOBO_Flaps_Position_Emissive_Parameters"/>
			</UseTemplate>

If there was no Loop

ASOBO feel free to add this to the SDK Docs.(If I am correct in this explanation)