Yes, there is another topic that started off with this question. However they side-stepped the issue.
I would like to create a simple system to convert a Length parameter to its decimal-feet value number.
i.e [Height: 25’ - 0"] becomes [25.0]
This specific scenario: I have a set of RCP trees. I am trying to generate lollipop tree models at these places for a rendering thing. I have managed to get the height of these RCP Trees. However it outputs at “25’ - 0”. I want the Trunk Height to match the existing tree and the canopy ball to be 2/3 of the height. Where it all falls apart is the math part. Dynamo can’t do math on a length type parameters. It returns null each time. My initial thought for a work around was “Just take the first two digits and then string-to-number them.” Problem is some of the trees are only 6’ so that won’t work, and work-arounds are bad. I want a way to just convert 25’ - 0" to 25.0. I feel like there has to be a simple way to do this.
Yes I know Height for Trunk Height is spelled Hight. That’s a house keeping issue for another time.
Revit.Revit RCP Tree to Lollipop Partial Code.dyn (417.9 KB)
Tree Sandbox.rvt (888 KB)