Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Sometimes a certain part of an object's code may need to be repeated many times. Even the number of repetitions may be required to be determined by the user. In short, the Repeat Object is used to clone a series of objects multiple times.


Many structures consist of repetitions of structural components. For example;
Multiple beams with different bracing locations in a bridge.
Multiple stem rigidity bars in a bridge.
Multiple panels for one tower.
Multiple floors for one building.
A previously defined content can be placed in the Repeat Object and cloned and positioned at certain geometric intervals. Any content inside the Repeat object is repeated as many times as the specified parameter.


All Repeat Objects must contain the following parameters:

  • S (start)

  • E (end)

  • I (increment)

  • CTRL (control parameter)

Example

<O N="Replicate" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 26.01.2023 -->
    <O N="Recap" T="Repeat" S="0" E="3" I="1" CTRL="j" j="0">
        <P N="Result" V="3^j" />
    </O>
    <O T="Design Code">
        <P N="RecapObjectList" V="Recap" />
        <P N="RecapResult0" V="Recap[0].Result" />
        <P N="RecapResult1" V="Recap[1].Result" />
        <P N="RecapResult2" V="Recap[2].Result" />
        <P N="RecapResult3" V="Recap[3].Result" />
        <P N="Result0" V="3^0" />
        <P N="Result1" V="3^1" />
        <P N="Result2" V="3^2" />
        <P N="Result3" V="3^3" />
    </O>
</O>

To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidywfidyhjvzme5h9q6soyns)

Example:

The Repeat Object also allows for counting elements in a list and separating them as needed. This can be useful in situations where specific elements within the list need to be grouped or separated based on certain criteria.

Example:

  • No labels