How to evenly space sub-components within a DC

Hi, Trying to get the studs evenly spaced in this dynamic component. I thought I could use the ‘Copies’ attribute as a variable to return the number of copies, then I could divide the length of the whole assembly to get the position of each copy within, but it’s not working. It works if I enter a numeric value, but I want to use a variable instead so that it will dynamically adjust. Any tips would be appreciated.

Install the Aerilius’ Attribute Inspector extension:
http://extensions.sketchup.com/en/content/attribute-inspector

… so you can see what is going on.

Then take a look at the “Framing Floor” component in the “Components Sampler” collection.
It comes installed with SketchUp.

copies returns a float, so use int(copies) to get a integer

The example files use the Floor or Ceiling functions.

Anssi