[Solved] Attributes and Scaling for wood-making purpose

 ]--------------------------------- ISSUE SOLVED -------------------------------------------------------[

Hello. I’m currently on a trail version of Sketchup Pro to see if it can help in my wood-making factory. Basically we do all sorts of doors, windows, furnitures.

My goal is to make a sort of “template” or “model component”, so that we’d just have to rescale the overall model depending on the client on the Z,X,Y axis.

The basic “measure tape” or using only the “scale tool” changes the thickness of the wood , which is something i don’t want. I want to be able to change the model’s size while keeping each wood components’ thickness at the same size.

What I currently have done is :

  • Modeled all the wood planks to make a basic rectangle-shaped furniture with the same
    component for top/bottom and a different one for the planks at the sides.

  • Pushed each planks to my desired thickness (1.9) before rotating them to form the furniture desired (that way when i hit the “report” option, i get all the thickness sizes in the same colomn, helps to make the order list of all the planks i require later on). Also, when i create my components, i’ve tried both glued to none or any.

  • Went to each component, opened the “component attributes” window, and changed the LenZ of each to “=1.9” then hit enter. (this works fine at keeping the planks’ thickness at 1.9 cm


whenever i take the overall component (or group , I tried that option instead as well) and either use the scale tool or set up the overall model lengh to make it in a different size, the thickness stays at 1.9 which is fine, but the components are separted, it makes some air distance between one and the others.

I’m sure it’s not a bug, must be something i’m doing the wrong way. Is someone willing to spend a bit of his or her time to help me ?


Sounds as if you might want to use Dynamic Components. They can be fiddly to set up and get working properly, but they can handle the changing positions and scale individual pieces of your doors and windows.

If you don’t have a lot of different sizes, it may be quicker just to redraw the ones you need, scaling the individual pieces and moving them so they keep registered at both ends.

Can you upload a sample door and/or window?

Hi John,

Thanks for answering! Yes, looking at a few tutorial, Dynamic Components is the best way i think to get to my goals. To do that tho, i need the attributes to work as i need it to, or rather get to know how to use it properly so that it does what i need it to do.

As i haven’t yet bought a copy and am using a trial (need to know if it’ll work the way i want before buying but need to buy it before i use it for official products).

We have a lot of sizes as we do “made to measure” products, fitting one’s kitchen exactly as they need it to, rather than standard sizes products. But the general shape is the same, so dynamic component used properly would be perfect I think.

1.Here’s a picture of the original size sample i’m working on. LenZ in attributes is set to “=1.9” so that the thickness won’t change

  1. Here’s what i’ve done to change the original product to another size (using the Scale tool will give the same issue) Ready to use is the overall component, made of 2 up/down component and
    2 sides components, all with LenZ individually set to =1.9.

  2. And here is the result and issue : although i gave it a 32 cm size (320 mm), it made it a 31,35 cm shape with a separation between the components.

Could you upload the component file and I’ll have a look tonight or tomorrow?

Sure! internet exercice.skp (21.6 KB)


Your dynamic component doesn’t work on my computer. I see the four sides as independent components, but they’re not bound together as a singular dynamic component e.g. four subcomponents all nested together.

Anyhow, more on that later.

What I do see right away is that you don’t have consistent directions set for the axes on each one of these.

Thats going to impact how that part acts according on its own understanding of where x,y,z. are orientated to.

I’d fix this before doing anything else.

This isn’t strictly true, it’s more optional really—you just have to account for the differences in the formulas you put together.

The other thing to consider as well is where these axes origin points are placed—relative to the component they serve, or the overall cabinet.

Sorry if i didn’t understand everything. Thanks Jim for answering!

About the flipping part, it is true that I design each planks “laying on the floor”, for one good reason : when put into component that way, and flipping the composant to make the cabinet/door/furniture, the report listing all the planks in Sketchup still sees the thickness on the same axis and therefore in the same column. Saves a lot of time to order the planks from the factory.

I’ll make a better exemple of the model i’m trying to experiment with, this one was a quick exemple. I’m reading the rest of your post while i do this.

Edit : about the subcomponents : it is true that i make each planks a component , then put them in the right shape and make a component of the overall figure. But I think I need to make the planks subcomponent on the overall model so that they are properly named and numbered in the report, which Groups can’t do as they act as individual units although having the same size.

That process actually means more work for you than your really need to do and it’s prone to errors. I would suggest you draw the parts in the orientation they’ll be used. You can get a proper list of the components in CSV form using the CutList extension which doesn’t require the axes to be oriented as you’ve done in your example.

1 Like

Hello Dave and thanks for the advice!

I’ll dive into CutList after I find the way to make the Dynamism of my component act as i hope it to, but it certainly would save me a lot of work!

I just did a dynamic component based on the picture: Two uprights and two horizontal planks, butt jointed:
Simple Frame.skp (44.8 KB)
When you scale it as a single component, it looks like the boards are getting thicker, but once you finish the scale operation it will redraw.

Ways it might not work for you:

  • If the planks you’re using aren’t surfaced on both sides, then you’ll need to rotate the copy. And that can be tricky!
  • if you want to use (and show) joinery - even as simple as a miter - you’ll need a more complex setup.

But here’s what it does:

  • Eliminates the “gap” problem
  • keeps the planks of constant thickness (except visually while you’re in the process of scaling)

internet exercice.skp (55.2 KB)

Here’s a Dynamic Component example that allows the user to enter the overall dimensions of the cabinet as text. You could make it so that the dimensions are chosen from a list or you could make the cabinet sizes adjustable with the Scale tool.

Hi Sjordst, and thanks for the answer!

Your model works perfectly with what I had in mind, although as it was made from inchs, even once converted to metrics, it isn’t able to be correct in length.

But as it is working the way it should, it is great. i’m curious to know how you/it fixed the “gap” problem, so I might replicate that work on later models?

Thanks Dave for the model. It is in my current unit and does exactly what i was looking for!
I’m curious to know how you fixed the gap problem that i had, so i could replicate that work later on?

Anyway, thanks again!

Look at the way things are set in the Dynamic Component Attributes window.

The length problem might be due to my hard coding “Thickness” as 3/4" the propagates. Or it might be that you didn’t change the model units (away from fractional inches) in a way that messes up your lengths.

To understand how I avoided the “gap” problem, look closely at how I set the size “LenX” attribute of “Flat” component and the position “X” attribute of the “Upright” component. They’re both formulas.

And notice as well that I have only one “Flat” and one “Upright” component which both generate 1 copy through the “Copies” attribute. And that I use “Copy” (a read only attribute populated by SketchUp) as part of the formulas.

One more hint: When you use “Copies”, the number you enter is in addition to the original. The value of “Copy” for the original is 0.

Oops! The position attribute “x” of the “Flat” component is also a formula and should be included in the study.

Thanks again! I’m a slow learner (as english isn’t my natural language) but i’m learning step by step.
I successfully changed the unit to metrics (mm) with the right precision.
As you guessed, the .75 for custom variable “Thickness” was messing things up, setting it at 1.9 cm did set most things right, in a unit that i could understand and therefore study your code.

Both Case Lengh Y and Z works fully well, when you give it a number, the case’s lengh matches that number.

However, I think you might have an issue with the Case.LenghX formula, which i wasn’t able to notice in inchs : when you give it a value of “28.1 cm” (stands for 281 mm) , the result is a X lengh of “30 cm” (300 mm). I don’t know where the issue is, but what i can say there is that the issue looks like :
right LenghX for Case = Case.lenghX_wanted - Thickness
or in numbers : = . 300 - 19

I see that DaveR has provided a quick and elegant solution, where you scale the overall size of the cabinet/case and could type in the dimension you want in each direction - but in inch units.

I’ve tried drawing this as a DC in a model with cm as the model units, and text box entries for the Height, Width, Depth and PanelThickness attributes of the overall cabinet.

However, until I forced the Attributes to take inputs in Centimeters, I couldn’t get the DC to scale properly.

I thought there was a way to set the Attributes up so that they would accept Text entries, and work with model units in either inch or metric units, but I can’t remember how.

Anyway, for the OP, here’s my version of the DC Cabinet.

And the model, saved back to v2014 for wider usefulness.
Cabinet.skp (56.9 KB)

PS. To simplify the formulae, I’ve set the right side to be a mirror image of the leftside, so that its origin is at the Cabinet Width distance from the left corner of the cabinet, and the thickness is measured from right to left.


This is a good thing to do. I opted not to do that to make it easier to understand what needs to happen with the right side as the cabinet width changes.