# Dynamic Components Attribute update

**URL:** <https://forums.sketchup.com/t/dynamic-components-attribute-update/112681>\
**Category:** Dynamic Components\
**Created:** [January 2, 2020, 1:06pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681 "2020-01-02T13:06:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 2, 2020, 1:06pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/1 "2020-01-02T13:06:02Z")

</div>

I am drawing outside panel boards for a house. These boards will be of different lengts but same price per meter.

I have created some attributes for the board component such as lenght, price per meter and total price for the board.

My intention is to create a report which calculates the total lenght of the boards used in the house and also the total cost for the boards…

My problem is when the price per meter changes. I then want to mark all the boards of same type and globally adjust the price per meter in Component Options. I of course don’t want to change each and every board individually.

But when I do this change I also affect the lenght of each board and all boards get the same lenght.

How can I avoid this?

I have Sketchup Pro 2018.

---

<div class="post-metadata">

**Author:** ![aroberts](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/aroberts/32/80353_2.png) [@aroberts](https://forums.sketchup.com/u/aroberts)\
**Post date:** [January 2, 2020, 2:03pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/2 "2020-01-02T14:03:54Z")

</div>

Are you able to post an example?

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [January 2, 2020, 2:18pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/3 "2020-01-02T14:18:40Z")

</div>

use scaling, instead

[scaling.skp](https://forums.sketchup.com/uploads/short-url/6peUTxmYEU2GW1uEWZbBpNI1Rbw.skp) (226.1 KB)

---

<div class="post-metadata">

**Author:** ![pcmoor](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/pcmoor/32/3427_2.png) [@pcmoor](https://forums.sketchup.com/u/pcmoor)\
**Post date:** [January 4, 2020, 12:17am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/4 "2020-01-04T00:17:18Z")

</div>

> [@lasseman](#):
>
> How can I avoid this?

do as Mike says, but do not expose the size attribute (leny?) in the option dialog, set its property to “users cannot see”

---

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 4, 2020, 9:17am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/5 "2020-01-04T09:17:14Z")

</div>

> [@pcmoor](#):
>
> (leny?)

Scaling for changing the prize per meter?

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [January 4, 2020, 9:37am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/6 "2020-01-04T09:37:38Z")

</div>

if you examine the example, the price/meter is set, the scaling affects the total of that instance by formula:  
`Total=LenZ*meterprice/100` (units in cm)  
I tend to use the LenZ for lengths, in general, studs are usually upwards orientated. Anything goes, as long as you have some system.  
You could set the Meterprice as ‘Users can edit as textbox’ in the Components Dialog, be sure to set all units correct (Decimal number, Euros)  
Note: this works for 'simple straight box 'geometry. If miters or cutouts are involved, it needs Xtra work. But for quick estimates, it works pretty well. (You always have to take in account losses for wood, anyhow)  
[scaling.skp](https://forums.sketchup.com/uploads/short-url/6peUTxmYEU2GW1uEWZbBpNI1Rbw.skp) (226.1 KB)  
[https://global.discourse-cdn.com/sketchup/original/3X/6/1/6181c7b51205f79962ea4b6c0f5bc5dd393627c5.mov](https://global.discourse-cdn.com/sketchup/original/3X/6/1/6181c7b51205f79962ea4b6c0f5bc5dd393627c5.mov)

---

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 4, 2020, 9:41am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/7 "2020-01-04T09:41:54Z")

</div>

> [@pcmoor](#):
>
> > [@lasseman](#):
> >
> > How can I avoid this?
> 
> do as Mike says, but do not expose the size attribute (leny?) in the option dialog, set its property to “users cannot see”

Well the fun thing is, when I try this and hide the LenY in the Component Option as you suggest, for some mysterious reason the formula for caluculating the Price disappears for all the boards and the same price is shown irrespektive of board lenght.

---

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 4, 2020, 9:45am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/8 "2020-01-04T09:45:37Z")

</div>

I am trying to find out how to upload a file here but cannot find it…

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [January 4, 2020, 9:46am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/9 "2020-01-04T09:46:42Z")

</div>

![Schermafbeelding 2020-01-04 om 10.45.54](https://global.discourse-cdn.com/sketchup/original/3X/5/a/5a044c867eb3f2b26dfa9b99eedf8c775d0f7c66.png)

---

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 4, 2020, 10:02am UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/10 "2020-01-04T10:02:12Z")

</div>

OK that easy…I tried to reduce the size of the fiile but I couldn’t

[Hus kpl.skp](https://forums.sketchup.com/uploads/short-url/chicJGTOIuBexNhpYXPLUlpwb5T.skp) (14.0 MB)

I have discussed other aspects of this here which solved some of my issues but now I am trying with a simple board go all the way to a final summary of total lenght and prize. I will try the angeled board after that.

> [@Attribute doesn't update](https://forums.sketchup.com/t/attribute-doesnt-update/104741/16):
>
> Sorry to bother again but I have been struggling a lot with this. I have finally fixed the problem with the changing of the angled part with a locked LenY-value for Corner LenY. So that is ok now I hope. Thank for the help with that part. My problem now is the total lenght of the complete board component. I have used the information in the link above but tried to simplify since I don’t need to change the size of the board. As shown in the screenshot below the total lenght is the LenY-attrib…

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [January 4, 2020, 12:27pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/11 "2020-01-04T12:27:41Z")

</div>

There are some minor settings with great impact: Instead of text, use decimal numbers.  
Somehow, the new price does not reflect instantly in the generate report. It needs a ‘redraw’ of all dynamic components. (this is a know issue with dc) Redrawing all boards is tedious, sometimes a rubyscript will help. But this also works:  
Instead of the Group with all the DC’s, turn it into a Component. Then rightclick on it and choose ‘Redraw’ from the DC options.

Model Info-\>Statistics-\>Purge unused

[Hus kpl.skp](https://forums.sketchup.com/uploads/short-url/pISfWSxVCDltlpcByHbJlIId5RD.skp) (167.7 KB)

---

<div class="post-metadata">

**Author:** ![lasseman](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lasseman](https://forums.sketchup.com/u/lasseman)\
**Post date:** [January 4, 2020, 1:20pm UTC](https://forums.sketchup.com/t/dynamic-components-attribute-update/112681/12 "2020-01-04T13:20:33Z")

</div>

Ok thanks for the input
