PADT 0.044 - SketchUp "BIMmy" Dynamic Components - Part 04
Controlling Multiple Attributes of Multiple Components
OK, Finally! This is coming together…
In this blog we will finally start to put all of these concepts of Dynamic Components together. What we will be doing is controlling several Components using a Master or “Parent” Component or simply “Components within Components”. The major key to this is knowing how Parameter data gets passed from the Parent Component to the Children.
Jumping into “Skippy”
If we go into SketchUp, we are starting all this by first creating our standard “Unit Cube” — a 1x1x1 cube. Let’s name this first cube “Box01” and then Copy it twice to make two more cubes and call them “Box02” and “Box03” respectively. Make sure you do this by first Move/Copying the first Component and then Right-Clicking on it, making it “Unique” and then Renaming it using the “Entity Info” Window and then the Component Attribute Menu.
They can be placed anywhere — we will Move them to their correct locations using the Attributes. Now we want to Select all of the Components and create then into a new Component called “BoxDaddy”.
Then if you Select the new “BoxDaddy” Component and then open the Component Attributes and Component Options, you’ll see the following:
In the Component Attributes, we have “BoxDaddy” at the top and the others listed below, slightly indented. This designates that they are contained within the Component listed above them. You can also see this relationship in the “Outliner” Window in your Tray.
The names of the Components are in Less-Than and Greater-Than “brackets”. You also know that these are Components within another Component because of the little down-arrow to the left of the “BoxDaddy” name. One note: there doesn’t seem to be a way to “reorder” the names of the sub-Components in the Component Attributes Menu, but they are sorted alpha-numerically in the Outliner Window.
The Big Difference
The big difference to what we’ve done before is that the Controlling Attributes are added to the Parent Component and not to the lower or sub-Components. The data from the Parent will be “passed” to the Children.
So let’s add an Attribute named “Var”. Note: you’ll find that using smaller Attribute names helps keep some of the Formulas shorter. In the “Details” for this Attribute we want to make it “Users can select from a list” with the following List Options:
This is exactly as we’ve done before. Now, the first Attribute we’re going to Control with these Variations is the Material. We are going to add the Material Attribute while using the Choose command with a little twist. To pull the Var from the Parent Component into the Formula for the sub-Component, we will use the Attribute in the Command in the following format:
In our case the Parent Component Name is “BoxDaddy” and the Attribute Name is “Var” so the we will use the Attribute:
in our Choose Formulas. So for each one of the “Box” Components, add the Material Attribute and add the Formula:
Once done, when you chose between the three (3) Variations, the Box Components will change color:
Now it’s just a matter of adding any of the other Attributes to the Box Components in the same manner and they all can be controlled by simply selecting the single Variation. Try adding all of these (Have Fun!!!):
If those have been entered correctly, each Variation should do several things: line the Boxes along the X, Y, or Z axes, change the size, change the color and change the rotation.
There you have it! You now that the skills to make many different Component forms all under Variation control.
There are several different Options which can also be added to Dynamic Components in concert with using Variations and the Choose Command. To demonstrate several of those we will use what we’ve learned and create a complete BIMmy Dynamic Component from start to finish.
I hope you’ve seen how you might be able to use this now for your projects. There are severe limitations to what kind of “building blocks” you can control, but that still offers a lot of possibilities. Whatever Component you can created can be Controlled using Variations for their Positions, Scaled in Each Axis, and Rotated. You’ll see later that you can create these using many other forms besides boxes. We’ll stick with Boxes for now just to get experience in how this all comes together.
Let me know if you have any comments or questions.
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.