Scaling last copy of sub-component in dc

sketchup
advice
components

#1

Hi,

Is it possible to scale the last copy of a component in a dc?

I have a dc which has a panel sub-component, this is copied between 5 and 8 times depending on height. I want to be able to scale the last one to say .25,.5,.75 panel height . Ending up with a DC that can be 5.5 panels high or 5.75 for instance.

I am just not sure how I would be able to call on a specific copy to apply the instruction.

Any help would be appreciated.

thanks


#2

If you know how many copies there are, you could use an IF statement eg. IF(COPY=8, do this, do that)


#3

You don’t have to know how many copies you have! Just make the IF condition “COPIES=COPY”.

You’ll probably also likely need a special case for when you don’t have a need for a fractional sized copy!


#4

IF(COPY=COPIES, do the things when TRUE, do the thing when FALSE)


#5

IF(COPY=COPIES,IF(,Do “I’m a fractional panel stuff”, Do “I’m a full panel stuff”), Do “I’m a full panel stuff”)


#6

Thanks a lot for the info, it’s appreciated.

To use, you currently select between 5 and 8 panels high from a drop down. I was hoping to include quarter panels and half panels into this list too.

So does the COPY = COPIES part identify that it’s on the copied panels to drive the panel scale ?


#7

The COPY=COPIES test for the LAST of n copies.

Actually, now that I think about it, COPY takes the values of 0…(COPIES-1), so it should actually be: COPY=(COPIES-1). Since the copy # is zero based, there will never be an instances of a dynamic component where COPY=COPIES.


#8

Thats got it, thanks.

The COPIES-1 was scaling the second to last copy though, COPY=COPIES worked.

Thanks again!


#9

Now that I think about it again, I was, indeed correct the first time! If a DC has COPIES set to 0, there is still the original. Thus when COPY=COPIES you are, indeed, working with the highest numbered copy.

So when COPY=0, you’re working on the “prototype” - which is also the first one. When COPIES > 0, then you have the original and duplicates. And the one (original or duplicate) where COPIES=COPY will the the last. And as you’ve found, it’s up to you to individualize the copies by use the COPY attribute in determining OTHER attributes that are calculated separately for each copy.