Cabinet Face Frame Dynamic Component - Lockdown Hobby

I’m stuck in my home design studio and can’t get out.

So…I’m motivated to learn dynamic components and want to start with something that I will use constantly. I chose a face frame. No doors yet. Just the frame.

I have built the basic frame with Left Stile, Right Stile, Top Rail, and Bottom Rail. It is fully parametric on all levels.
I want to now move to adding Mid Stiles and Mid Rails. Mid Stiles WITH Mid Rails is a crazy difficulty in my mind so I’m starting with just Mid Rails: A frame for a 3 drawer cabinet.

I would like to be able to choose if the frame has mid-rails and if so, how many (1-3). Then, to give it some more complexity, would like to add the ability to choose the spacing between the rails.

First off…are there materials written somewhere that I can read about this task and learn on my own?

If not…the steps are these.

  1. Create option to choose whether Mid-Rails are present
  2. If they are, a drop down allows user to pick amount.
  3. If “1” is chosen populate a text box to choose spacing down from top rail
  4. If “2” is chosen populate two text boxes. First is spacing of first mid rail down from top rail. Second is spacing of second mid rail down from the first mid rail.
  5. If “3” is chosen populate three text boxes. First is spacing of first mid rail down from top rail. Second is spacing of second mid rail down from the first mid rail. Third is spacing of third mid rail down from the second mid rail.
  6. When “Apply” is pressed, all “chosen” mid rails populate frame as designated.

My hangups:
Seems like this a function of “Copy” and “Repeat” but I’m not sure how to add the mid rail component into my frame and have it be hidden until I choose the quantity of mid rails that I need.

Thanks for any suggestions

You need a test based on the number of mid-rails chosen.

If 0 (none) hide all mid rails.

If 1, hide middle and bottom rails

If 2, hide none of the mid-rails


That is, give each of the mid-rails a Hidden attribute, and make it True by default, then just unhidden (False) depending on the number of them as above.

Haven’t time to give you a worked example, but I hope this will give you a working starting point.

Are your frame stiles and rails all rectangular, or are they moulded? I think if they have moulded edges, you have to make the moulded edges separate components, otherwise the width of the mouldings will scale with the width of the stiles, and the length of the rails. So you need to position (for example) the left edge of the moulding for the left stile with its X position at the width of the rectangular part of the stile.

You then have to hide the edges (permanently) where the moulded ‘addition’ meets the stile or rail.

But that may be for another day!


I like that…totally makes sense and is super simple to accomplish. No problem on not providing a sample. The direction is best as i will learn it better.

Had not thought about molded frames yet. That would be a complexity that I would need to add when i’m a bit smarter about all this.


You are very welcome. Do you plan to upload the finished DC to the 3D Warehouse? I could use a copy if you are willing to share it.

I see you are based in the USA, so you are probably using feet and/or inches, and/or fractions.

But be aware that converting DCs to work in metric units brings in a whole new range of unit conversions, and some bugs.

See this very recent thread, and the link in it to an old thread on the subject.

I would certainly consider sharing it on 3DW as I can’t find anything of the kind there. Working on a very simple way to model cabinets and this is the first step.

Not really interested in adding in Metric unless there was some kind of super serious reason to do so…which is basically saying…cash works wonders :)? I think something as simple as this would be better to model separately in my opinion. Take the finished product and copy it in a metric model and publish it that way for all our metric brethren.

Not to distract you for long from learning to make DCs, which I know is part of your motivation, but if you are mainly or only using rectangular stiles and rails, you might find it quicker to draw them with the aid of a plugin @slbaumgartner made a major contribution to make an idea of mine work: it’s called Wood Framing, and is available from the SketchUcation Plugin Store.

Decent idea…but too much individual part handling. When doing large projects, hundreds of face frame parts are possible. Trying to move away from that kind of workflow. I don’t have to export to machine centers or part labels, it’s just for design drawings only. So the quickest way to get 2D line drawings and decent models is the goal.

is there a public location to learn about syntax? Or do you just have to learn that by reading a thousand threads?

I found several with a general google search. Here’s one from the Sketchup team.

I also tried the site, but when I tried a search for dynamic components, the screen stayed greyed out and I go no results. Maybe I didn’t wait long enough?

PS. You could also download some examples from the 3D Warehouse.

I found it helpful to look at DC’s others had created.

1 Like

I forgot, I made a Frame dynamic component some time ago. You might find it helpful as a reference.

It allows multiple mid rails, but makes them all equally spaced if I remember rightly.

Frame DC.skp (70.6 KB)

IMPORT this file into an existing or new drawing. If you just open it, it won’t work - it’s like being in a component open for editing.

I now see I had (mis)labeled the stile and rail elements in reverse. Now fixed in the version uploaded to this post.

Thanks for posting - it’s given me the motivation to go back and look again at these. I’m by no means an expert on DCs, but I have succeeded in making a couple of dozen different ones, some very simple, some a little more complex. But always somewhat frustrating to make!

PS. Just further updated the Frame.skp file above to include a wider range of thicknesses to select from, up to 36" and to correct the misnaming of stiles (now the vertical pieces) and rails (now the horizontal pieces) and to fix a small logic error in the rail spacings which became apparent when rail and stile widths were significantly different.

Using narrow stiles and rails, and a large ‘thickness’ one can make a simple cabinet carcass, or a simple bookcase. Like these. for example (dimensions added separately, not part of the DC):

I agree with this - see how other people have made theirs.

And if you get stuck, ask on the forum again.

I have a couple of fairly complex models in the 3d warehouse that might give you some idea of what can be done.
24" - 40" Adjustable stage stairs
36"-56" adjustable WonderStructure Stage Support

They aren’t exactly what you are trying to do but they are at least interesting.
I’m always looking for new and better ways of doing things.

John is an excellent resource as you have found out. And in general, for specific issues, this SU forum and it’s excellent members (who freely donate their time, effort and expertise) are just invaluable.

But if you are looking for a in-depth video course devoted to DC subject matter, this may be worth your time to investigate. Learning styles are varied. When I became interested in DC (specifically the programming logic), I found a video tutorial at (now Linkedin Learning) to be very helpful. You can preview the course and also sign up for a free month. I have no affiliation but have found several SU courses by different instructors to match my learning style.

Hope this helps …

that’s a pretty cool trick. Looking over your component right now. I’m seeing that you use the “hidden” attribute and the “copy” attribute.

Is copying a component a better choice then modeling in the specific parts and just keeping them hidden?

After having for over 2 years and never once using it AND paying nearly $500 for the experience, I’m trying to stay away from those types platforms…especially now when everything is so unsteady with the virus. Prefer to keep the cash in the pocket if you know what I mean. Thanks for the tip though.

Can you get me links to those? They don’t show up on 3DW.

looking at your DC

you have this line of code on the “crosspiece” behavior called “hidden”:

=IF(Parent!Num_Xpieces = 0, TRUE, FALSE)

= starts the syntax
IF is the logic statement type, in this case an if/then statement
(Parent!Num_Xpieces is the attribute on the main container parent that is also a visible option
= 0 is asking what option is currently selected

at this point I get confused

,TRUE, FALSE) Not really understanding what this is saying. Why the comma’s? Why both True and False?

The syntax is saying (in words)

If the (condition is true [that the number of crosspieces is zero] then pick the first of the two options [TRUE - so hide it])

But if the condition is FALSE, pick the second option - hide is FALSE, so DO show it.

Does that clarify things?

It’s a fairly standard programming convention:
If condition is true, pick the first of the following options, otherwise the second one.

The IF statement has three arguments: the logic to test, the value to return if the test passes, and the value to return if the test fails. In this particular case that is somewhat redundant, as the value of the test itself is true or false.

1 Like

It might be worth me saying that I was/am a Cabinet Vision user for over 10 years. The parametrics in Sketchup are the same thing really which gives me a head start I guess on understanding. I can already see similarities in the syntax as well, it’s just learning the unique patterns to this language.