From the course: SketchUp Pro: Dynamic Components

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Concatenate a material name with length to swap materials

Concatenate a material name with length to swap materials - SketchUp Tutorial

From the course: SketchUp Pro: Dynamic Components

Start my 1-month free trial

Concatenate a material name with length to swap materials

- [Instructor] At this stage, we're able to use both of these user interface elements. We can change the panel width and the number of panels, independently or simultaneously, and when we Apply the changes are updated. However, the materials are not correct. This is stretched as compared to the way it looks with a four foot wide panel. This is the appearance that we want. When the panel gets wider, the material should look the same. We can implement that by adding an attribute to the panel itself which is where the material is assigned. I'll add the material behavior and you can see that currently the Fabric48 material is assigned. I'm going to change that and have it work with the variable. I'll say it's equal to and I'm going to place the word fabric in quotes. And then I'll use the special ampersand operator which concatenates strings. In other words, it puts text together. So, I want to put the word fabric together with the number which represents the width of that particular…

Contents