# Dynamic copy function

**URL:** <https://forums.sketchup.com/t/dynamic-copy-function/121352>\
**Category:** Dynamic Components\
**Created:** [April 8, 2020, 7:01pm UTC](https://forums.sketchup.com/t/dynamic-copy-function/121352 "2020-04-08T19:01:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkman](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkman](https://forums.sketchup.com/u/bkman)\
**Post date:** [April 8, 2020, 7:01pm UTC](https://forums.sketchup.com/t/dynamic-copy-function/121352/1 "2020-04-08T19:01:32Z")

</div>

I am setting up a component that copies itself in the Y. Is there a way to also copy it in the X at the same time? Small vertical stub circled in Red on screenshot:

 ![Screen Shot 2020-04-08 at 2.51.26 PM](https://global.discourse-cdn.com/sketchup/original/3X/f/9/f963eff7ffb17e192b440e951caeddf03c8958ce.png)

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [April 8, 2020, 10:09pm UTC](https://forums.sketchup.com/t/dynamic-copy-function/121352/2 "2020-04-08T22:09:19Z")

</div>

Copies are linear (n-copies), and you need to map the PosX **and** the PosY of each copy in a row x column array.  
Look for the ‘Tile Grid’ example in the component panel,  
‘Dynamic Components training’ folder.

---

<div class="post-metadata">

**Author:** ![bkman](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkman](https://forums.sketchup.com/u/bkman)\
**Post date:** [May 28, 2020, 3:45pm UTC](https://forums.sketchup.com/t/dynamic-copy-function/121352/3 "2020-05-28T15:45:40Z")

</div>

I got this to mostly work but somewhere along the line I am ending up with 1 extra piece. Where in my formulas do I subtract this out? Is the error in my position Y formula?

 ![Screen Shot 2020-05-28 at 11.37.57 AM](https://global.discourse-cdn.com/sketchup/original/3X/5/0/501cb764bac169043eccab6efc345c0c42d8b905.png) ![Screen Shot 2020-05-28 at 11.37.38 AM](https://global.discourse-cdn.com/sketchup/original/3X/3/c/3ca16c9bb6c9416373d4a67c78262a27a445aabc.png)

---

<div class="post-metadata">

**Author:** ![bkman](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@bkman](https://forums.sketchup.com/u/bkman)\
**Post date:** [May 28, 2020, 3:59pm UTC](https://forums.sketchup.com/t/dynamic-copy-function/121352/4 "2020-05-28T15:59:08Z")

</div>

Never mind I fixed it, Copies should have been CopyX \* CopyY-1, I forgot to subtract 1. Thanks for pointing me in the right direction previously.
