Dynamic Components with multiple variables

I am wondering how those of you with wider experience of DCs might deal with this (apparently) simple problem.

Let us say that we want to make a DC for a 2D drawing of the cross section of a steel I beam. Let us further say that we want to limit the number of options to the following:

89 x 152
102 x 178
102 x 203
133 x 203
102 x 254
146 x 254

For simplicity, we will assume that flange and web widths are consistent at 8mm and 6mm respectively.

We only have three elements: top flange; web; bottom flange. The two flanges are identical and the web is always central.

We want the user to be able to choose from the six beam sizes.

We could set up the DC so that the user selects from the four widths and the four heights. The problem comes when you realize that that would give you far more choices than actually exist. And the width is not defined by the height or vice versa.

With the six options above, I cannot think of an elegant way to do it. But I’m sure I must be overlooking something obvious.

you could use choose with the index of the dropdown

=choose(OPTIONINDEX("sizes"),8.9,10.2,10.2,13.3,10.2,14.6)

or if able to, put the index in the values of the dropdown

=choose(sizes,8.9,10.2,10.2,13.3,10.2,14.6)

choose with a dropdown.skp (26.6 KB)

If there a greater number of values, then could consider breaking up the size string using find

posX =find("x",size,1)
wide =trim( mid(size,1,posX-1))/10
high = mid(size,posX+2, len(size)-posX-1)/10 -2*flange_thick

although a bit more complicated code you do not have to list the sizes and use choose,

(the trim removes the space for the width, whereas I shifted the start and end to allow for the space in the height)

You see, that’s the kind of brilliance I was looking for! Thank you.

here’s a 3D model with that set up:

It turns red if you need some xtra hands to place it

1 Like

That could be useful too.

I tried to get to the file but got this:

Am I doing something wrong?

Yes, you should consult someone :slight_smile:
I dunno, It worked for me:

HEA.skp (128,3 KB)

Ta muchly.

1 Like

Have just opened that file and it doesn’t look like a DC. It shows a standard I beam divided into four identical quadrants. But there seem to be no options.

Do you have a link to the 3DW model?

Import it in an existing file, You have opened the ‘wrapper’…

Oh yes. That’s clever. Still on the dimness spectrum, how do you change its length? There is a box in the Options but it is not editable.

Once I know that, I just have to find what HEA sections are (not in use in UK AFAIK).

I’ve got the answer. Make the text box editable in the Attributes.

1 Like

I prefer scaling because its quicker, but this was more about how to set these kind of DC’s.
Check how many parts you need to make it work.

The roundings change depending on the height of the profile, but it’s not calculated, they refer to an array of values that are choosen through the CHOOSE(OPTION() formula.

Scaling - of course.

When I get a spare moment, I might amend the options so that they relate to UK steel sizes. And domestic work rarely involves any section bigger than 300mm so it would be a relatively short list. That would cover for beams and columns but I guess a bit of clever footwork could make it work for channels too.

Is this all your own work then? I’ll mark it for you if it is.

Should I post it in the ‘Gallery’ section of the forum?
I just used a steel configurator app on my phone and translated into a dynamic component for a training to show that you can do that in SketchUp, but it will take some effort…

I think you should post it there. It could be of interest to a lot of building designers.

Because Britain, US, and Europe (at least), all use different steel sections, it would be useful to indicate which attributes need to be changed to suit.

I know in the US, wide flange sections can commonly exceed that size. In my building alone the range goes from 7w to 36w. She’s an old factory from the 70s, but we also have a metal frame building with larger sections that was built in the 90s.

I’m not sure what you’re after with this, but I thought I’d chime in if the information would help.

Thanks for that OMP.

As if to demonstrate that we live in two countries divided by a common language, the terms “7w to 36w” have no meaning over here. You are more likely to get something like 203x133x30 (which means a 203mm deep beam 133mm wide and weighing 30kg/m). Just to confuse matters, we also still have a few tapered flange beams, a standard which dates back to the days when it was difficult to make parallel flange sections.

I guess for wide usage, there does need to be a way of accommodating all common steel sizes available in a given country. I was saying that for my own personal use, I don’t come across sections larger than 300mm in domestic architecture. Industrial and commercial buildings are quite another matter but they are not my bag!

Hey, make what you use, man! I’m all about that. So yeah, here they do a fairly awkward method for wide flange beams. It’s listed as the section “depth” (ish) and then the weight per linear foot. It’s a really weird way to classify them, as several section profiles could satisfy those requirements given the width, web and flange thickness can all vary. Having said that, each size has a preset width and section thickness, but it isn’t inherently obvious.

As an example of one of the chonky bois in my building, here’s a 36 WF 150 that 304mm x 914mm and weighs 68kg per foot.

Nice! I was l just searching 3D warehouse for steel sections and didn’t see this.

I’m spoiled by Alfred Scott’s Wild Tools plugin for PowerCADD. It includes a palette for steel sections and fasteners, one tool of which is wide flange sections:

Tool collection:
Screen Shot 2021-05-08 at 11.56.31 AM

Select a region for Wide Flange sections:

@OldManPatterson1979 's W 36 x 150 looks like this:

@MikeWayzovski 's HE 240 A looks like this:

You can see the basic shape and the numeric fields used to draw them. Can this be done with a dynamic component, or would it have to be a live component?

1 Like

I imagine so.

I don’t think LCs have been released in the wild yet, have they?