I’m trying to build a dynamic component that allows me to set the finish height of a stage deck by selecting it from a list of available leg lengths.
The intention is that you select the required finish height of the deck and the deck sets itself to this height and the legs update their length to accommodate, but remain at position z=0. The deck leg length is 1.5cm less than the height of the deck.
I have included screenshots of my setup for this, and you can see that both instances where I am referencing my custom attribute ‘DeckFinishHeight’ the formula returns an error. Could you help me to figure out why this is?
Second screenshot, as a new user I could only put one reference image in my post!
How about uploading the SKP file, too?
Sure thing, a slightly large omission!
Prolyte StageDex 2x1m.skp (99.8 KB)
Get rid of the comma after StageDex in the component definition name and correct the formula and it works fine.
Prolyte Stage Dex 2x1m.skp
Thanks so much Dave, I’ll have to shake my comma usage habit!
Yes, it, can, be, a problem.
Note that you can use the Parent! keyword in formulas instead of the full name of the containing component or group. I don’t know if it helps if the actual name contains illegal characters.
Should anyone reading this thread want Imperial (foot-sized) Steeldecks, which are conceptually similar, see the 3D warehouse and search for ‘steeldeck’.
Rory and I have drawn versions which work similarly, but in his case use a drop down list of standard metric heights, and mine (based on his geometry, with his permission) have allowed free input within a range.
It’s these bugs that makes me hate DC. If it doesn’t support the same component names that SketchUp itself supports it could at least warn users about it.
Another is the thing with units. Uncheck the “display units format” box in Model Info and all DCs revert to using inches.
Units in DC are just weird. I find it extremely arbitrary how you can chose between cm and inches only, but no other units. And how it cannot be changed later without having to change all formulas. Why can’t lengths be parsed in the same way as all other lengths inputs in SketchUp?
There no limit on how much could be written on the topic of DC oddities. I think it’s wise not to discuss it further in this thread.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.