Attribute doesn't update

Hi I need some advice

I have an issue with the attributes for a wall panel board which I am trying to create.

I want some attributes since I want to be able to get a report of the total length of the boards and a total cost of all the boards used.

Sorry but my Sketchup version is a Swedish one but I try to explain.

These boards are going to be set on the gable of a house as shown in the picture. Here are only half of the boards shown. Some of them have been adjusted in length. Each board will be unique component to be able to adjust the length individually.

image
image

I have added an attribute for length (LenY) and created two attributes for price per meter and price (total). Looks like this.
image

The formula for the Pris_kr/Price_SEK is =Pris_per_m_kr*LenY/100

When I created the dynamic component Ytterpanel/Outerpanel the length was originally 2700 mm. With a price of 10 SEK per meter the total price for the board will be 27 SEK. OK, so far so good.

But when I added the boards to the wall and started to adjust the length for each board, I expected that the calculation for the price would update automatically and show the new price. But it didn’t.

As shown in the picture above the price is still 27 SEK although the length has changed to 95mm.

To get an update of the price I must type in 10 once more and then the price will be correct. And I must do this for every board individually. And that takes a little time.

My question is:

Why doesn’t the Pris/Price update automatically when I adjust the length?

you need to redraw for the component to update, adding a scaler will do this

Mousa Abu Doush @sketchuparchive, is the neatest method

example.skp (24.7 KB)

I don’t think I understand…

why not make one component, and scale that:

Then, generate report:

1 Like

@MikeWayzovski
You will find that the component you have created does not update when scaled, but reflects the previous value
if you use current and the inch conversion then it will update
=current("LenZ") * 2.54 * rate/100
updated example
example.skp (32.7 KB)

The use of a scaler has the advantage of updating the material as well

1 Like

I have now tried the formula with inch conversion and that seems to work
But I don’t understand why it has to be an inch conversion included???

I have also tried the material scaler but hasn’t got that to work yet.
As I understund the material scaler should be nested under the board component according to the example.

Seems like I spoke a little too soon.
The update of price calculation is working

But when I use the scale tool to adjust the lenght of the board it seems like the angle on the top of the board changes too.

Both panel had “perfect” fitting against the roof before scaling.
But when I changed the lenght of the right board by dragging the lower end into position with the scale tool, the angle at the other end changed

image

Setting of the scale tool attribute
Sorry Swedish but Scale along green axis (Y) is marked.
image

I assume I made som mistake with the scale tool setting but I can’t figure out how.
Maybe you can lead me in the right direction? Why does the end of the board change?

I use components to crate spaces to generate room areas. I have to force a “redraw” each time the size changes or the area is reported incorrectly. Not sure if this is a similar problem.

Yes the basic problem was that I couldn’t get the price calculation for the coponent to update when I changed the lenght.

Now I have a problem with the scale-solution since it changes the component in an unwanted way.

How do you redraw?

Select component. Right click Dynamic Components >Redraw

Thank you I have looked for that for a long time…

Ok
Since I cannot find a way to rescale the lenght without changing the other end of the board I will use PushPull and adjust the lenght and then redraw.

You have to divide the shape in multiple shapes:

OK now we’re getting somewhere.
As I understand it the board component has to be made of two components, the straight board which will be changed in lenght and then the angled part.

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-attribute under Ytterpanel (4.582 cm)…
As shown from the dimensions this s not the accurate lenght. It should be approx. 9.7 cm.

The lenght of the corner part is locked to 6.194 cm (LenY) to avoid the part to change
When I change the lenght of the board with the scale tool the Ytterpanel LenY is updated but still incorrect.
I will need this correct lenght for a report with the total used lenght of boards.

So my first question is
Why is not Ytterpanel LenY correct?

Storlek = Size

make the Body LenY a formula of Ytterpanel

=Ytterpanel 120x21!LenY-Corner!LenY

then any alteration in the parent will effect the child.

It is possible and in some cases desirable for the children sizes to work outside the parent’s nominated sizes

1 Like