Dynamic Components Attribute update

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.

Are you able to post an example?

use scaling, instead

scaling.skp (226.1 KB)

1 Like

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

Scaling for changing the prize per meter?

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 (226.1 KB)

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.

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

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

Hus kpl.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.

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 (167.7 KB)

Ok thanks for the input