Skip to content
07-848 2005

SketchUp, SketchUp desktop

Repeating a sub-component within a dynamic component (1 dimension)

Create a dynamic component in SketchUp that repeats a sub-component as you scale it, such as pickets in a fence or steps in a stair.

Create a dynamic component in SketchUp that repeats a sub-component as you scale it. Examples include pickets in a fence and steps in a stair.

The fence shown below contains 4 sub-components: a top rail, a bottom rail, a picket and a post. In this example, you repeat the picket as you scale the fence in the X direction. You need to control the spacing between copies and their arrangement: in a line for a fence, diagonally for stairs or in a circle for circular stairs.

Fence component with a post, picket, top rail and bottom rail.
  1. Create the component with a single instance of the sub-component you want to repeat, such as a fence with one picket.
  2. Context-click the component to open its context menu.
  3. Select Dynamic Components > Component Attributes to open the Component Attributes dialog box.
  4. Click the plus (+) button next to the Fence component to show its attributes.
Component Attributes panel showing Fence position and size, plus Post, Picket, TopRail and BottomRail sections.
  1. Click Add attribute in the last row of the Fence component. A list of predefined attributes appears, and the field opens for editing.
  2. Type spacing and press Enter (Microsoft Windows) or Return (Mac OS X). The 'spacing' attribute appears under 'Custom', and the field next to it opens for editing.
  3. Type 2.
  4. Press Tab to accept the value and set the spacing between pickets to 2". Fence attributes panel with custom spacing set to 2 for a 2-inch gap between pickets.
  5. Click the plus (+) button next to the Picket component to show its attributes.
  6. Click add attribute in the last row of the Picket component. A list of predefined attributes appears, and the field opens for editing.
  7. Click 'Copies' in the list. The field displays 'Copies', and the field next to it opens for editing. The formula you enter here calculates the number of copies from the length of the TopRail (or BottomRail) component.
  8. Type =(TopRail!LenX)/(Picket!LenX+Fence!spacing)-1.
  9. Press Tab to accept the value. The formula divides the TopRail component's length in the X direction, TopRail!LenX, by the picket width plus the spacing, Picket!LenX+Fence!spacing. It then subtracts 1 to calculate the number of copies. The copies share the original Picket component's X and Z coordinates, so they overlap. The next formula positions each copy along the X direction.
  1. Double-click the value field for the 'X' attribute.
  2. Press Backspace (Microsoft Windows) or Delete (Mac OS X) to delete the current value for the 'X' attribute.
  3. Type =5+COPY*(Fence!spacing+LenX).
  4. Press Tab to accept the value. This formula uses the predefined 'Copy' attribute to set each picket's X position. Copy starts at 0 for the original Picket and increases by one for each copy. Its value is 1 for the first copy, 2 for the second copy and 3 for the third copy, and so on. The Component Attributes dialog box shows only the original Picket component's X value.
  1. Click the close button.
  2. Use the Scale tool to scale the component in the X direction. The component should add pickets as you scale it.
Fence component with Scale tool grips for scaling it in the X direction to add pickets.

You can hide the other scale handles so only those in the X direction appear when you use the Scale tool. See Hiding scale handles.

Procadsys customer support

Still need help?

Licences, renewals and billing

Our New Zealand team looks after your SketchUp licences, renewals and invoices.

Monday to Friday, 9:00 am to 4:30 pm NZ time, excluding New Zealand public holidays.

Technical problems

Technical support from our New Zealand team is available with a current Procadsys SketchUp Plus subscription: Pro Plus, Pro Scan Plus, Pro Civil Contractor Plus, Pro Advanced Workflows Plus or Studio Plus.

Initial response within one business day.

On another SketchUp plan? Technical problems go to Trimble support.