Repeating a sub-component within a dynamic component (2 Dimensions)

PRO This is a Pro only feature.

A repetitive dynamic component is a component containing a sub-component that replicate, such as the tiles within a floor component. In the case of a floor and tiles, the component scales in 2 dimensions, X, and Y.

Note: You should create a component whose subcomponent replicates in one direction prior to creating a component whose subcomponent replicates in two directions. This document assumes you are familiar with 1 dimensional replication. Refer to 'Repeating a sub-component within a dynamic component (1 Dimension)'.

Following is an image of the Floor component containing 1 Tile sub-component (it simply looks like one tile). The Tile sub-component replicates as the Floor component is scaled in the X and Y directions (using the Scale tool).

Following is an image of the Floor component after it has been scaled. Now the Floor has 8 copies of the replicating Tile subcomponent.

To replicate a subcomponent within a parent component (in two dimensions):

  1. Create your component with one subcomponent, such as a floor with one tile.
  2. Context-click on the component. The component's context menu is displayed.
  3. Select the Dynamic Components > Component Attributes menu item. The Component Attributes dialog box is displayed.
  4. Ensure that the attributes for all components are visible.
  5. Create a 'Columns' attribute in the Floor component to hold the number of rows in your dynamic component.
  6. Create a 'Rows' attribute in the Floor component to hold the number of rows in your dynamic component.
  7. Create an attribute, in the Floor component, that represents the size of the replicating subcomponent. For example, this example contains a 'TileSize' attribute.
  8. Set 'TileSize' to some value, such as 12.
  9. Set the 'LenX' and 'LenY' of the Tile subcomponent to the size in the parent component. For example, set 'LenX' to equal Floor!TileSize and 'LenY' to equal Floor!TileSize (for the Floor Tile subcomponent).
  10. Use a formula in the field next to the Floor component's 'Columns' attribute to determine the number of columns in the parent component. This formula will be based on the size of the replicating subcomponent (Tile) and overall size of the parent component (Floor). For example:

  11. =CEILING(LenX/TileSize)

    Note: The ceiling function, with only one argument, rounds the result of LenY/tilesize to the nearest bigger whole number.

  12. Use a formula in the field next to the Floor's 'Rows' attribute to determine the number of rows in the parent component. This formula will be based on the tile size of the replicating subcomponent (Tile) and overall size of the parent component (Floor). For example:

  13. =CEILING(LenY/TileSize)

  14. Add the Copies attribute to the Tile subcomponent.
  15. Use a formula in the field next to the 'Copies' attribute to calculate the number of copies of the replicating subcomponent. The copies are calculated by multiplying the rows by columns and subtracting one (for the original). For example:

  16. =Floor!rows*Floor!columns-1

  17. Establish the position of each replicating subcomponent (the exact column and row). Position is determined by establishing a multiplier that represents the row or column and then multiplying the multiplier by the size of the subcomponent to establish its X and Y location.
    1. Create an attribute to hold the row multiplier, such as myRow, in the Tile subcomponent.
    2. Use a formula in the field next to the 'myRow' attribute that iterates through each copy and determines the row where the copy will be placed. For example:

    3. =FLOOR(COPY/Floor!columns)

      If Copy equals 7, and there are 3 columns in the object, then myRow will be equal to 2. Note that rows start at 0, so 2 represents the 3rd row.

      Note: The floor function, with one argument, rounds the result down to the nearest whole number.

    4. Create an attribute to hold the column multiplier, such as myColumn, in the Tile subcomponent.
    5. Use a formula in the field next to the 'myColumn' attribute that iterates through each copy and determines the column where the copy will be placed. For example:

    6. =COPY-(myRow*Floor!columns)

      If copy equals 7, myRow equals 2 (calculated previously) and there are 3 columns in the object, then myColumn will be equal to 1. Note that columns start at 0, so 1 represents the 2rd row.

      Note: The floor function, with one argument, rounds the result down to the nearest whole number.

    7. Use a formula in the field next to the Tile subcomponent's 'X' attribute to calculate the location of the sub-component. For example:

    8. X =myColumn*floor!tilesize

    9. Use a formula in the field next to the Tile sub-component's 'Y' attribute to calculate the location of the sub-component. For example:

    10. Y =myRow*floor!tilesize

      The following is an image of the Component Attributes dialog box with all Floor and Title attributes:

      Note: The Tile replicating subcomponent is copy 0 and only the values for copy 0 are displayed in the Component Attributes dialog box.
Was this article helpful?