Hi guys,
Just want to check with you a couple of things regarding dynamic components.
I am trying to make a Building block which will report all the necessary information to SketchUp report.
Why FACEAREA() returns area which is 2 times bigger then it supposes to be?
I want a user to be able to select Building Use which will change a colour of the component. It seems straightforward, but how to report not a colour but actual usage?
Also is there a way to have a component name above it? So it easy to see where components with wrong names?
I have attached images so its easier to understand what I want to get.
When both sides of a face are painted with the same material (or a group or component is painted in its totality), SketchUp reports the total area painted, so both sides count. In a similar situation, I painted all the faces inside my cube component except the top of the “floor” with a non-default material so the material applied to the component affects only that single side of a single face.
Hi Anssi,
Yes, I know that. But I don’t have the material applied to my face and I am using FACEAREA() without specifying the material name, so I should get just one face are not x4?
Even if I apply material to the component face material should still be “default” and report a correct area.
With no material passed to find an area you are reporting the area of “all faces” - and since a face has a front and a back-side it comes out x2.
To sidestep the issue use /2 of the area returned, or specify a material special inside the component, applied directly to the front of one face and then get the area of just that…
It is what I tried as well. But I still getting area X2 bigger. For some reason I have to divide by 4 to get correct number?
I have plane which 3X3 should get 9, but I am getting 18 )) ?
2: add another attribute which you can select in the report to display . Formula for this attribute would be something like: = IF(Material=“Green”, “Residential”,“Other”)
3: you can display with the interact tool , I think, add an onclick behavior and put in ALERT(“message”)
But unfortunately I got FACEAREA() problem again, it looks like it doesn’t update when I change a size (LenX and LenY) of a face. LenX and LebY come done from the main component.
I tried to redraw, but still area the same.
Haven’t tried, but as with no:2 it might help if you would reference the LenX etc. to another custom attribute, like Width,Depth and Height, let the user change those attributes and reference the LenX etc to them ( LenX=Depth etc)
Edit : Nope… doesn’t work, even the Example of the FACEAREA() function it does not work, it only seems to work when you are actually editing the component, not by changing the LenX in the Component Options dialog…
:)) Why do you need this function then ?? I might use just simple multiplication of LenX to LenY.
I thought FACEAREA() would be more flexible to use. In case I want to change my component from rectangles to circles. or other shapes
OK does anyone knows how to get a correct area from the component using FACEARAE() function?
Redraw command doesn’t update the area after changing component size via “User Text Box”
I switched off scale handles
User can enter LenX and LenY in a text box
After changing the values of LenX and LenY Area is wrong!
changing lenx,leny…stretches the material, if you make a component unique (if required) and scale definition from the context menu, the material will reset or rather redrawn(?) hence the calculation of the area of un-stretched would be then correct. (you may need to active the redraw as well)