Create a Dynamic Component fence using the Copies Attribute that automatically copies the object. This attribute is often used when drawing handrails, fences, multi-tray shelves, tiling, and similar repeating elements. This is one of the most powerful features of SketchUp Dynamic Components that makes models highly customizable.
Dynamic Components run on the Dynamic Components extension, which ships with the Pro and Studio subscriptions only. Since SketchUp moved to named-user subscriptions in 2020 (the current line is SketchUp 2026), there is no perpetual license, and SketchUp Free in the browser cannot load extensions at all — so a fence built with Copies will open in Free but its automatic copying behavior will not recalculate there.
What Is the SketchUp Copies Attribute?
The Copies attribute in SketchUp Dynamic Components tells the component how many times it should repeat itself along a given axis. When you resize the parent component, SketchUp recalculates the number of copies automatically based on a formula you define. The original sub-component becomes a template — SketchUp places N copies next to it, each inheriting the same attributes.
This is different from manually copying objects. With dynamic component copies in SketchUp, the model reacts to a dimension input. Change the fence length from 10 feet to 30 feet and every picket repositions and the count updates instantly. No manual editing, no rebuilding the model.
The Copies attribute can be set on any sub-component nested inside a parent. You access it through Window > Component Attributes. The attribute name is Copies and its value is a formula.
Dynamic Component Copies in SketchUp — Fence Tutorial Video
Watch the step-by-step video below to see the full fence build, including how to wire the spacing formula and test it with Component Options.
How the Copies Formula Works (Spacing Math Explained)
The core formula for a fence picket with even spacing is:
Copies = INT((ParentLenX - PicketWidth) / (PicketWidth + GapSize))
Breaking it down:
- ParentLenX — the total length of the fence panel (the parent component’s X dimension).
- PicketWidth — the width of one picket sub-component (its own LenX).
- GapSize — the space between pickets. Store this as a user-controlled attribute so the gap is adjustable from Component Options.
- INT() — rounds down to a whole number. You cannot have a fractional copy.
For the X position of each copy, use the formula:
PosX = (PicketWidth + GapSize) * CopyNumber
where CopyNumber is the built-in index SketchUp provides automatically (0, 1, 2…). This spaces each picket evenly from left to right across the panel.
Step-by-Step: Building the Fence Dynamic Component
1. Model the picket sub-component
Draw one fence picket as a component. Name it something clear, like Picket. Keep its origin at the bottom-left corner. This makes position formulas simpler — PosX = 0 places the picket flush at the panel’s left edge.
2. Create the parent panel component
Select the picket, then create another component around it named FencePanel. This parent is what you will resize from Component Options. It needs a LenX attribute exposed as a user-editable option (label it “Panel Length”).
3. Add the Copies attribute to the picket
With the parent open for editing, select the picket sub-component. Open Window > Component Attributes. Click the + button and add the attribute Copies. Set its formula to INT((ParentLenX - LenX) / (LenX + Gap)) where Gap is a custom attribute you define on the picket or the parent.
4. Set the PosX formula
Still on the picket’s attributes, find or add the PosX attribute. Set it to (LenX + Gap) * CopyNumber. This is where SketchUp’s dynamic copies mechanism actually positions each repeated instance.
5. Expose Gap as a user option
Add a Gap attribute to the parent. Check the Users can edit checkbox and label it “Picket Spacing”. Now anyone using the model can open Component Options and adjust the gap without touching the formulas.
6. Test with Component Options
Close editing mode. Select the parent component. Open Window > Component Options. Change the Panel Length slider. The pickets should redistribute immediately. If copies overlap or vanish, the most common fix is to check that PosX references the picket’s own LenX, not the parent’s.
Common Gotchas with the Copies Attribute
- Copies = 0 or negative — happens when the formula yields a number below 1. Add a MAX guard:
MAX(0, INT(...)). SketchUp does not show negative copies; it just hides all instances. - Pickets pile up at origin — PosX formula is missing or set to a constant. Each copy must have a PosX that multiplies by
CopyNumber. - Parent LenX does not update — you are scaling with the Scale tool instead of dragging the green handle via Interact Tool. Always use the Interact Tool (Tools > Interact) or Component Options to resize a dynamic component. The Scale tool bypasses attribute recalculation.
- Extension not loaded — on a new machine or a shared model, check that Extensions > Dynamic Components is enabled in Extension Manager. Without it, the component opens but none of the formulas run.
- Copies work in SketchUp Pro only — the Dynamic Components extension is not available in SketchUp Go or SketchUp Free. Models open, but Copies will not recalculate.
Download Example Models
Download the finished fence dynamic component and practice modifying the formulas yourself. The file includes a single-picket version and a complete variable-gap fence panel.
[download placeholder]For a library of ready-made Dynamic Component models you can drop into your projects, see Parashape — SketchUp Dynamic Component Library.
Lesson Objectives
- Understand how the Copies attribute drives automatic repetition in SketchUp Dynamic Components.
- Write a spacing formula that calculates picket count from panel length and gap size.
- Use
CopyNumberin PosX to distribute copies evenly. - Expose user-editable attributes through Component Options so non-technical users can resize the fence.
- Diagnose and fix the three most common Copies formula errors.
Notes
- Formulas in Component Attributes use SketchUp’s own expression language — not Ruby. Arithmetic,
INT(),MAX(),MIN(), andIF()are supported. Trigonometry functions are also available. - Attribute names are case-sensitive.
Copies≠copies. CopyNumberstarts at 0 for the original sub-component and increments by 1 for each copy. The original is always present; Copies = 3 means you get the original plus 3 more (4 total).- Nested dynamic copies work — a picket can itself be a dynamic component with its own height formula.
For more on Dynamic Components fundamentals, including the Interact Tool and how to set up Component Options, see SketchUp Dynamic Components Tutorial.

Tiếng Việt