Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating a dynamic picket fence: Customizing attributes

From: Google SketchUp Pro: Tools and Techniques

Video: Creating a dynamic picket fence: Customizing attributes

Now we pretty much have our fence ready to go. In fact, if I wanted to, I could just use this as is. But let's go ahead and make this a little bit more customizable. So what I am going to do is add in some additional attributes that will show up in our Component Options window and as you can see, when I pull up this window, there are no options to choose from. So let's go ahead and add in some. We are going to go back to Component Attributes, and start adding in some components that will show up for the user to work with.

Creating a dynamic picket fence: Customizing attributes

Now we pretty much have our fence ready to go. In fact, if I wanted to, I could just use this as is. But let's go ahead and make this a little bit more customizable. So what I am going to do is add in some additional attributes that will show up in our Component Options window and as you can see, when I pull up this window, there are no options to choose from. So let's go ahead and add in some. We are going to go back to Component Attributes, and start adding in some components that will show up for the user to work with.

Now the first one I want to work is the actual height of the fence. Now as you can see here, we have the lengths all specified. Now if I want to, I could actually restrict some of those. So for example, here in terms of scale, if I wanted to, I could actually scale this and you can see how the scaling is actually affecting this and I really don't want to do that. So I am actually going to go ahead and constrain the length of Y to =6.25 inches. So now when I scale this, it's always going to be the same depth.

Now in terms of height, I actually do want to be able to scale this so I have different height fences. Now I want to make this available to the user so the user can type in a very specific fence height. So let's go ahead over here to Details. We are going to highlight LenZ and here I am going to click on Details. And what this does is it tells us what we can do with this particular attribute. So what we want to do is I want to allow the user to edit it as a textbox and then we can give it a label.

So we can call it, for example, Fence Height and just hit Enter and now when we apply that, you can see that when we go into our Component Options window, we now have a variable called Fence Height. So I can just type in, say if I want it to be 48 inches, it will be exactly 48 inches. Now in addition to this, we also want to be able to control say for example, the spacing of the pickets. So let's go into Picket here, and we have our variable here for Spacing and we want to be able to expose that to the user.

Now if I do it this way, I could actually click here on Details and say Users can edit it as a textbox. But if I do that, say Apply, when I select this component and go into Component Options, you will see here I don't actually have that. I have to actually kind of dig down and select the individual picket to find the spacing. Well that's kind of unfriendly in terms of user interface and I don't want to do it that way. So I am going to go ahead and back out of here and I am going to go down to my Spacing here and I am going to actually turn it off.

User cannot see this attribute, hit Apply. Now what I want to do is actually have something here that is exposed to the user. This means I have to have it up here in the main component, in Fencing. So what I am going to do is go ahead and add an attribute here and I am going to enter a custom name and I am just going to type in PicketSpacing and then I can type in a number. So for example, here I've got 10.

And let's go ahead and say Users can edit as a textbox. So now when I have it up here and I select it, I go into my Component Options window, you can see now I have a PicketSpacing, but the problem is that when I change it, nothing happens. That's because it's not connected down here. This number 10 is not connected to the actual picket and its spacing. So what I have to do here is instead of typing the number in, I have to enter in the attributes. So all I have to do is hit = and then click on PicketSpacing.

So now the spacing here is actually the FencingPicketSpacing. Hit Enter and that should work. Now it's actually going to revert back to 10, but it's getting its 10 from here. So this should all now work. So now I have PicketSpacing, and I can say now instead of 10, it's 8 and so on and so forth. We will bring it back to 10 or whatever. We can do the same for some of the other options here. So we could actually do the same for, for example, the Post Spacing.

So here, instead of typing in a number, we can actually add in the attribute from here. So let's go ahead and add an attribute in here, custom name, and we'll call it PostSpacing, hit Enter, put in the number. I think I had 72 in there, and now for this PostSpacing, I am actually going to say = and then go up here. You can barely see it but here I am going to click on PostSpacing and then just hit Enter.

So now that I have this here, all I have to do is now expose this. So PostSpacing, go ahead and click here, Users can edit as a textbox, hit Apply and now when we go into our Component Options here, I have my PicketSpacing and my PostSpacing. So for example, if I were to scale this out a little bit more, I could put in my PostSpacing as say 48 and you can see now it actually affects the behavior of this component.

Great! So now we've got a couple more that we could actually add in. One of the ones I would like to add in would be the width of the pickets. So in order to do that, we actually have to figure out which variable controls the width. So right here, we have the Length of X, which is the width of that picket. So all I l have to do here is type in a different number. So for example, if I typed in 9, so =9, they would be 9 inches wide. If I typed in =3, they would be 3 inches wide.

Now I can again control this by an attribute that I can place up here. So let's go ahead and add in an attribute, custom name, and we will call it PicketWidth. Once I have that, then all I have to do is just a) type in the number, say 5.5 inches or so and then, come down here to Picket, find this Length of X and instead of =3, it's going to equal this attribute.

So now all I have to do is type in that and I can do whatever. Now in order to see this, I still need to expose it to the user. So I am going to go here to Details and let's expose it by saying User can edit as a textbox and say Apply. So you can see here now, I can just type in the width of my pickets, but actually pickets only come in set sizes. They only come in four, six and eight inches, which is actually 3.5, 5.5 and 7.5 because in lumber, they usually chop off about half of an inch.

So let's go ahead make this instead of a textbox, let's go ahead and select it from the list. So I am going to add an option here. We are going to say 4 inches, 6 inches, and 8 inches. Now notice that it already puts that value in and we can always change that but a four inch board in lumber-speak is actually 3.5 inch board, 6 inches is actually 5.5 and 8 inches is actually 7.5, and now that we have that, we actually have a list that determines the actual width of that particular picket.

So let's go ahead into Component Options here. You can see here we have PicketWidth and all I have to do is just select one, hit Apply, 8 inches and so on. So as you can see by adding in these Component Options, we can give the user complete control over the way that our fence behaves.

Show transcript

This video is part of

Image for Google SketchUp Pro: Tools and Techniques
Google SketchUp Pro: Tools and Techniques

38 video lessons · 10156 viewers

George Maestri
Author

 
Expand all | Collapse all
  1. 3m 33s
    1. Welcome
      1m 4s
    2. Using the exercise files
      24s
    3. Important Mac and PC differences
      2m 5s
  2. 9m 41s
    1. The Component Options window
      3m 32s
    2. Using the Interact tool
      1m 54s
    3. Using metadata in the Component Options window
      4m 15s
  3. 1h 6m
    1. Using the Component Attributes window
      4m 46s
    2. Exposing component attributes
      6m 0s
    3. Creating a drop-down list
      8m 42s
    4. Creating dynamic materials
      8m 29s
    5. Creating a dynamic picket fence
      2m 10s
    6. Creating a dynamic picket fence: Assembling the components
      4m 54s
    7. Creating a dynamic picket fence: Making pickets multiply
      6m 11s
    8. Creating a dynamic picket fence: Making fence posts multiply
      4m 0s
    9. Creating a dynamic picket fence: Customizing attributes
      8m 18s
    10. Adding interactivity: Motion
      5m 25s
    11. Adding interactivity: Rotation
      4m 10s
    12. Adding interactivity: Changing colors
      3m 45s
  4. 39m 37s
    1. The LayOut interface
      2m 56s
    2. Drawing lines and arcs
      4m 33s
    3. Drawing rectangles
      2m 22s
    4. Drawing circles and polygons
      2m 31s
    5. Modifying line styles and color
      3m 2s
    6. Working with text
      3m 0s
    7. Inserting SketchUp models
      4m 33s
    8. Manipulating SketchUp models
      3m 30s
    9. Working with dimensions
      2m 17s
    10. Arranging and grouping objects
      3m 5s
    11. Creating scrapbooks
      3m 11s
    12. Creating presentations
      2m 40s
    13. Exporting and printing
      1m 57s
  5. 6m 40s
    1. The Style Builder interface
      2m 5s
    2. Working with strokes
      4m 35s
  6. 19m 15s
    1. Importing objects from AutoCAD
      6m 37s
    2. Importing other 3D objects
      3m 14s
    3. Exporting objects
      4m 38s
    4. Exporting objects for rendering
      4m 46s
  7. 19s
    1. Goodbye
      19s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Google SketchUp Pro: Tools and Techniques.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.