PragArchDesignTech by Dave Edwards

Share this post
PADT 0.043 - SketchUp "BIMmy" Dynamic Components - Part 03
pragarchdesigntech.substack.com

PADT 0.043 - SketchUp "BIMmy" Dynamic Components - Part 03

Next Parameters to Control: Rotation & Materials

Dave Edwards
Nov 15, 2021
Share this post
PADT 0.043 - SketchUp "BIMmy" Dynamic Components - Part 03
pragarchdesigntech.substack.com

Continuing On…

Again, let’s open our SketchUp Dynamic Component file we’ve been working with. Remember to select the Component first and then Open the Component Options and Component Attribute Menus. This time we are going to add the Rotation Parameters in the Component Attributes Menu by selecting “Rotation (add all)”.

The way Rotation works can be a little confusing at first. This Attribute will Rotate the Component about it’s Origin in the X,Y or Z axis and not by the center of the Component — unless you’ve moved the axis to that position. The Rotation is defined by the decimal angle in degrees in an “Anti-Clockwise” fashion — the same as you would when Rotating objects using standard SketchUp commands. But this can seem a little weird depending on where you’re viewing the Component from. This anti-clockwise Rotation works when you’re viewing the Component while in the Positive portion of the Axis. I’ve created a graphic which shows where the confusion crops up.

Everything seems quite normal for the Rotation along the X and Z axes, but the Y axis seems to Rotate in the wrong direction. This is because we are currently looking at the Origin from the Negative Y axis. Just be aware of this when you are trying to set the correct value.

Angle Precision & Negative Angles

In the Attribute, you can specify the Angle of Rotation using Real numbers (e.g. 45.75). It doesn’t seem to make any difference if you’ve changed the Precision of the Angle Display in the Window>Model Info>Units>Angle>Display Precision.

You can also set Negative Angles. So we could set the following formulas to see how the Component Rotates as different Variations are selected and Applied:

RotX =choose(Variations,-45,0,0)
RotY =choose(Variations,0,90,0)
RotX =choose(Variations,0,0,270)

By setting the only one non-zero Angle for each Variation, you can see exactly how choosing a different Variations Rotates the Component. Naturally you could Rotate the Component on all three (3) axes if that’s what’s needed. This shows setting all of the Rotations to different Angles for Variation 3:

Before Going On…

I hope you’re seeing how important this is for creating “BIMmy” Objects. With a single choice, you’ll selected 3 different Attributes. Any of them can be accessed this way. Beyond just Component creation, Part Numbers could be assigned, Costs assigned, etc. etc. and all of this could be exported to a Report or a Spreadsheet.

Assigning Materials

This part seems pretty easy but there are a few issues that may mess you up. If you want to look at the names of the SketchUp Materials, you can open the Materials Window in the Tray and hover your cursor over the Material Icon and the name of the Material will be shown:

You could also choose the Details Arrow next to Material Categories Pull-Down and select “List View”. This is important because in order to assign Materials using Component Options you must know the Name of the Material. Also, in order to Assign a Material, that Material must be “In the Model”. The easiest (and less messy) way to do this is to Right-Click on the Material Icon (or Name) and select “Add to model”.

However, there are a few Materials which you can select via Component Attributes which don’t have to be Added to the Model before they can be used. These are “Named Colors” and color using RGB Hex codes. If you look at “Colors-Name” in a List View, you will see a long list of Named Colors:

You can use these Names in the Component Attributes without having to add them to the Model first. Let try this out for the 3 Variations. In Component Attributes, let’s now Add the Materials Attribute under “Behaviors”:

We can now “Choose” any of the Named Colors using this Attribute. In this example, I’ve chosen “Crimson”, “Honeydew”, and “RosyBrown”. These are simply the Named Colors minus the 4-digit code suffix. We would then assign the follow command to the Material Attribute:

Material =choose(Variations,"Crimson","Honeydew","RosyBrown")

If we go through the Variations, we’ll see that the Component does change colors.

Please note that the Color Names must be enclosed in quotes. This is why the simple names of Colors like “Red”, “Green”, and “Blue” work because the Named Colors includes: “0020_Red”, “0076_Green”, and “0103_Blue”.

So if you wish to use one of the other Materials, such as “Terrazzo Light Blue”, just remember to Add them to the Model first and then they can be Assigned in the Material Attribute with the Choose command. Also, if you’re making changes, such as scaling or rotating a texture, to a Material, it would be a good idea to give that Material a different Name just so that it’s not confused with the original.

Hex Values

Another interesting way to assign Materials is by using their Hexidecimal codes. If you go into SketchUp’s Material Window and select “Create Material…”, you’ll see all of the options for creating new Materials. If you select “RGB” in the drop-down by “Picker”, you’ll see where you can assign colors based on their Red, Green, and Blue values.

You can change the color of your Material by moving the sliders or entering values to the Right. Unfortunately, there values are in decimal and we need them in Hexadecimal (Base-16). Once you have the values for the Material you desire, you can enter those values into a Programmer Calculator (or conversion website) to get their Hex values. A Material like “RosyBrown” has RGB values of 188, 143, and 143 respectively, so you would have #BC8F8F for the Hex value. You could enter that into your Choose function and it wouldn’t have to be added to the Model before it was assigned:

This becomes really helpful when you’re trying to match colors for another color system, such as Pantone. There are numerous websites which will give you the Hex value for the Pantone number, such as hexcolor.co/pantone-colors. It will give you the Pantone number, a color swatch, the RGB value and the Hex Value:

Summation

Now you can control most of the common attributes using a single Variation. To add Variations, all you would do is select the Details arrow for the Attribute “Variations”:

and the add another Option:

You would need to go back to your Choose formulas and add a fourth Option. Pretty simple once you understand how all this works.

Let me know if you have any comments or questions - or what else about BIMmy Dynamic Components you’d like to explore.

SeeYa!

Next Time: Control Multiple Components Using Parent Components


Announcement & Tutorials Links

Fredo6 New Plugin Move Align Me For SketchUp

How to Use PATH TRACING in Twinmotion 2022!

The Secret to Beautiful Renders in Blender (great advice for users of any rendering software)

How To Make LUMION FORMATS! Lumion 12 Custom Library!


Musical Inspiration

Mike Dawes & Tommy Emmanuel - Somebody That I Used to Know (2021)

Mike Dawes - Jump (Van Halen) Solo Acoustic Guitar


eMailSlot

Email: pragarchdesigntech@substack.com


Shameless Plugs

CAD TrueType Subs - TrueType Fonts which replace the standard Romans & Simplex SHX Fonts

Project Newplex - The Advanced SHX Font Designed for Technical Documents

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.
Contact: dave@tcfonts.com

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.


Leave a comment

Share this post
PADT 0.043 - SketchUp "BIMmy" Dynamic Components - Part 03
pragarchdesigntech.substack.com
TopNewCommunity

No posts

Ready for more?

© 2022 Dave Edwards
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing