- changed title to ParamML-Sum for parameters of repeat object
ParamML-Sum for parameters of repeat object
Issue #210
resolved
I have a repeat object like below.
<O N="L1" T="Repeat" S="0" E="length(refinedD)-1" I="1" CTRL="j" j="0">
<O N="VerticalRebar" T="Circle" X="refinedW[0]" Y="refinedD[j]">
<P N="Radius" V="BarDiameter/2" />
<P N="Inertia" V="BarArea*((refinedW[0])^2)+((refinedD[j])^2)" />
</O
Above repeat object returns to an object list and I want to calculate the sum of all L1[j].Inertia values. Is there any solution?
Comments (6)
-
reporter -
I think you are trying to do something like this:
<O N="L1" T="Repeat" S="1" E="10" I="1" CTRL="i" i="0"> <!-- some formula to calculate Intertia --> <P N="Inertia" V="i * 10" /> <!-- if i > 1: Sum=Inertia[i]+Inertia[i-1]; otherwise: Sum=0 --> <P N="Sum" V="Inertia + iif(i.GT.S, L1[i-1].Sum, 0)" /> </O> <!-- the sum of all Inertia --> <P N="TotalInertia" V="L1[10].Sum" />
-
reporter I saw the following error when I tried your solution.
-
Can you refresh and try again? Make sure that you are using v3.160610.
-
Just realized that it is not about the version. Don't look at it in the library under Object View. Either use the app and look at the compiled code (through Objects explorer) or look at it through the API. I think we need to change Object View of library to display compiled data instead of source input data.
-
- edited description
- changed status to resolved
- Log in to comment