Skip to content
07-848 2005

SketchUp, SketchUp desktop

Constrain dynamic component attributes

Constrain parts of a dynamic component in SketchUp so they keep their size or orientation to the axes when you use the Scale tool.

Use constraints in SketchUp to keep groups or sub-components at a set size or orientation to the axes when you scale a dynamic component. Follow these steps to set the constraints.

  1. Create a component made entirely of groups or sub-component instances, each with a unique name. The example image shows a fence with 4 sub-components: a post, top rail, bottom rail and picket. The parent component is named Fence. Its sub-components are named Post, TopRail, BottomRail and Picket.
Fence component with a post, picket, top rail and bottom rail.
  1. Context-click the component to open its context menu.
  2. Select Dynamic Components > Component Attributes to open the Component Attributes dialog box.
  3. Click the + button next to Fence to show its empty attribute list.
Component Attributes panel with Fence's empty attribute list expanded above Post, Picket, TopRail and BottomRail.
  1. Click add attribute in the last row of Fence. A list of predefined attributes appears, and the field opens for editing.
  2. Click Position in the predefined attributes list to show all position attributes for Fence.
  3. Click add attribute in the last row of Fence. A list of predefined attributes appears, and the field opens for editing.
  4. Click 'Size' in the predefined attributes list to show all size attributes for Fence. The following image shows these attributes.
Fence attributes show Position and Size, with LenX 15 inches, LenY 4 inches and LenZ 60 inches.
  1. The attributes appear in light grey because they are not constrained to specific values.
  2. Double-click the field next to LenY in Fence to edit it.
  3. Delete the current value.
  4. Type =4 in the 'LenY' field to constrain Fence's length in the Y direction. This prevents scaling in that direction.
  5. Press Tab to accept the formula. The LenY value (4) appears in black to show it is constrained. You cannot resize this dimension with the Scale tool.
  6. Click + next to TopRail to show its attributes.
  7. Click add attribute in the last row of TopRail. A list of predefined attributes appears, and the field opens for editing.
  8. Click Position in the predefined attributes list to show all position attributes for TopRail.
  9. Click add attribute in the last row of TopRail. A list of predefined attributes appears, and the field opens for editing.
  10. Click 'Size' in the predefined attributes list to show all size attributes for TopRail.
  11. Double-click the field next to X in TopRail to edit it.
  12. Delete the current value.
  13. Type =4 in TopRail's 'X' field to position it 4" along the X axis from Fence's origin. This allows for the Pole's 4" width. You generally constrain all sub-component values. The parent values you constrain depend on the component. In this example, Fence's thickness (LenY) is constrained to 4". All other parent values remain unconstrained, including its position relative to SketchUp's axes (X, Y and Z). This lets you move Fence anywhere and scale it in the X and Z directions (LenX and LenZ).
  1. Press Tab to accept the formula.
  2. Double-click the field next to Y to edit it.
  3. Delete the current value.
  4. Type =1.25 in TopRail's 'Y' field to position it 1.25" along the Y axis from Fence's origin, at the middle of the Pole.
  5. Press Tab to accept the formula.
  6. Double-click the field next to Z to edit it.
  7. Type =Fence!LenZ-9 in TopRail's 'Z' field to constrain the Pole's Z value using Fence's overall height (Fence!LenZ).
  8. Press Tab to accept the formula. TopRail's Z value is constrained to 9 inches below Fence's height (Fence!LenZ). The following image shows the changes made in steps 9 through 29.
TopRail attributes show X at 4 inches, Y at 1.25 inches and Z at 51 inches, 9 inches below Fence's height.
  1. Double-click the field next to LenX to edit it.
  2. Delete the current value.
  3. Type =Fence!LenX-Post!LenX in TopRail's 'LenX' field. This constrains TopRail's length to Fence's length minus the post's length (4").
  4. Press Tab to accept the formula.
  5. Double-click the field next to LenY to edit it.
  6. Delete the current value.
  7. Type =1.5 in TopRail's 'LenY' field to set its thickness to 1.5".
  8. Press Tab to accept the formula.
  9. Double-click the field next to LenZ to edit it.
  10. Delete the current value.
  11. Type =3.5 in TopRail's 'LenZ' field to set its height to 3.5".
  12. Press Tab to accept the formula. All of TopRail's default attributes are now constrained, so scaling cannot freely change its position or size. The following image shows the changes made in steps 30 through 41.
TopRail attributes show constrained position and size, with LenX 11 inches, LenY 1.5 inches and LenZ 3.5 inches.
  1. Constrain all default attributes (X, Y, Z, LenZ, LenY and LenZ) for each remaining sub-component of Fence.
  1. Click Close.
  2. Scale the component with the Scale tool. It should scale only in the unconstrained X and Z directions. Sub-components should keep their constrained dimensions, such as the width and depth of the posts and pickets.

Procadsys customer support

Still need help?

Licences, renewals and billing

Our New Zealand team looks after your SketchUp licences, renewals and invoices.

Monday to Friday, 9:00 am to 4:30 pm NZ time, excluding New Zealand public holidays.

Technical problems

Technical support from our New Zealand team is available with a current Procadsys SketchUp Plus subscription: Pro Plus, Pro Scan Plus, Pro Civil Contractor Plus, Pro Advanced Workflows Plus or Studio Plus.

Initial response within one business day.

On another SketchUp plan? Technical problems go to Trimble support.