PADT 0.045 - SketchUp "BIMmy" Dynamic Components - Part 5
Creating a BIMmy Beam Component
OK - let’s actually create something…
and maybe I can do it this time without screwing up! <grin>
We’re not going to get too crazy (yet…), but take the techniques we’ve learned and create something useful IRW (In the Real World). What we’re going to create is a Beam which changes sizes based on standard “W” sizes. I know different countries use different standards, but I think you’ll be able to adapt this to any Beam standard.
This what we are going for in the end:
The Depth, Width and Length will eventually all be controlled by Dynamic Component Parameters.
Starting the Process
To make things consistent, we will still be using Unit Cubes as Building Blocks within our Component. But the first thing I always want to do it “map” out my project to determine which parts I’ll need and the formulas needs for the Parameters. It’s also similar to comments you put into code when you’re programming. There will always be a time when you need to go back to make changes and try to figure out what you did and why. It’s also very useful when you’re trying to create another Component using similar techniques.
Here are the W Sizes we’ll be creating:
OK - OK - I can hear it now: “Well, those are stupid sizes - no one uses them!” Forgive me if I’ve picked weird sizes - I’m not a Structural Engineer - I just play one on the web.
The Opening Steps in SketchUp
As with most of these BIMmy Dynamic Components, we start by creating three (3) Unit Cube Components named “FL1”, “FL2”, and “Web”:
We then Select all three of these Components and make a Parent Component named “Beam”.
Select the Beam Component and Open the Component Attributes Menu. We’ll then add a Parameter named “Var”. This is the Parameter which will control the Variations of the “W” Beam Types. Its Details should be:
Units: Default: Text Display rules: Users can select from a list. Display lable: Beam Sizes List Option Value W18x106 1 W21x147 2 W24x146 3 W27x146 4
We then create Parameters to hold the selected Sizes of the Beam parts:
These are the four (4) Parameters we will add to the Beam Component and the Details for each. Mapping things (and keeping then stored someplace) really helps things in the long-run. As mentioned before, I like to keep the names short so the Formulas don’t end up being too long.
Attribute: DP Units: Decimal Number Display rule: Users can see this attribute. Display label: Depth Display in: Decimal Number Attribute: FT Units: Decimal Number Display rule: Users can see this attribute. Display label: Flange Thickness Display in: Decimal Number Attribute: FW Units: Decimal Number Display rule: Users can see this attribute. Display label: Flange Width Display in: Decimal Number Attribute: WT Units: Decimal Number Display rule: Users can see this attribute. Display label: Web Thickness Display in: Decimal Number
If you open the Component Options, you should see this:
And you should see one of the “Gotchas”. The Parameters which can be shown or Selected from are ordered Alpha-Numerically based on the Parameter names, not the Display Label. I really want “Beam Sizes” to be at the Top of the Component Options Menu. The trick to accomplish this is to Rename the Parameter “Var” to “AVar”. This is done by Double-Clicking on the “Var” Parameter and entering the new name:
Now if you click away from the Beam Component and then Re-Select it, you’ll see “Beam Sizes” at the top of the Component Options Menu:
Depending on how many Parameters I’m going have (some Components have a bunch), I’ll start naming then “A01zzzz” - “A02zzzz” or “A10zzzz” - “A20zzzz” if I think there may be Parameters I’m going to add later, so they can be inserted in the Order I want. All of the other Parameters should be set to Zero. The reason we’re doing it this way is once the Variations are Selected, you’ll be able to see the Values for these Parameters on the menu and then those Parameters will be used in the Formulas for the individual Sub-Components. This makes those Formulas less cumbersome and makes it easier to add additional Variations.
Cool Feature Note: If you Rename a Parameter which is used in Formulas, the Parameter Names in the Formulas will also be changed - saves a ton of time!
Add the Choose Formulas to the Beam Parameters
The first thing we’ll want to do before we create the Beam Parameter Formulas is to set our Model Units by going to Window>Model Info>Units>Format and Selecting “Decimal” and setting Length to “Inches”. Based on the values for different W-Size Beams listed above, you will enter these Formulas for the Beam Parameters (be sure to Toggle on the Formula View icon):
Once these Formulas are entered, you should these values appear in the Component Options menu:
If you then Select a different Beam Size, all the Parameter Values below should change (after you hit “Apply”):
These should reflect the Values taken from the Spreadsheet above.
Let’s stop there and save this file as “BIMmy Beam” and we’ll get the “fun” part next. Play on ahead and see what you come up with!
Announcement & Tutorials Links
Dave Edwards has been in the CAD/BIM industry as a manager, developer, consultant, speaker, and author for almost 40 years. He has had 80 magazine articles published, written 3 international newsletters, reviewed over 300 CAD/BIM applications and 3D modeled over 1 Billion dollars worth of architectural projects. He is available for professional alpha/beta testing, application feature consulting, technical documentation, seminar presentations, and voice overs.
Copyright © 2021 by Dave Edwards Consulting. All rights reserved.
All trademarks belong to their respective holders.
Translations and opinions expressed are not necessarily shared by Dave Edwards Consulting.
By accessing this newsletter in any manner, you agree to settle disputes within ten days of publication date by arbitration within the city limits of Montgomery, Alabama, United States with the arbitrator selected by an agent acting on behalf of Dave Edwards Consulting.