Defining Attribute Values

Defining attribute values

After you set up an attribute or three, you’re ready to enter values that tell the attributes what to do. You can complete this step in a myriad ways, depending on the attributes you choose.

Generally speaking, you can define attribute values in the following ways:

  • Type in the attribute value text box. For example, add a Description attribute and type a description directly in the value text box. (See Callout 1 in the following figure.) If you’re defining formulas, type an equal sign (=) and then enter your formula. 
     

     

    Tip: If you want to see the complete formulas in the attribute value box, click the Toggle Formula View button in the upper right of the Component Attributes dialog box. If you manipulate a component with a SketchUp tool while the Component Attributes dialog box is open, click the Refresh button to refresh values in the Component Attributes dialog box.

     

  • Insert a function from the drop-down list. To see the drop-down list, click the Functions tab. Open the drop-down list to select from any of the dynamic component functions. (See Callout 2.) After you select a function, you see a brief description (in very tiny text) below the drop-down list. Select the attribute value text box where you want to insert the function, and click the Insert button to add the function to the text box. Then you need to customize the value based on the function you chose.
  • Click the Details arrow () in the attribute value field. You see a drop-down list that enables you to set display values for the attribute. Select whether or not users can see the attribute, and if so, whether the value appears as a text box or a drop-down list. If you select the Users Can Select from a List option, you can then define what values users can select. In this example, adding different materials values enables users to select from a limited range of materials. (See Callout 3.)

When you create formulas, here are the rules you need to follow:

  • Put text in quotes.
  • Concatenate a string with the ampersand (&). For example: ="I am a table with the cost of" & variable name
  • To display quotes in a text string, use a backslash (\). For example: ="This is the "\official\" retail price for this item:" & variable name
  • Formulas that return numbers will return them as floating values, never as integers. So, the formula if(5=5,1,0) will return 1.0 instead of 1.
  • All lengths are in inches and angles in degrees.
  • Use an exclamation point (!) to refer to a value outside of the current subcomponent. For example, Fence!spacing refers to the value of the spacing variable in the Fence component.

 

Tip: This overview of the basic options can help you connect the features in the Component Attributes dialog box to the attribute, function, and operator references. These references contain the building blocks for adding dynamic features to components, as you see in the dynamic component examples.

 

Was this article helpful?