new user here and I was wondering if I could get some help on a particular issue.
I am trying to have dynamo convert a decimal feet number to fraction feet and inches. the converted dimension should be formatted like xx’-yy". the idea is to then push this “converted” dimension back into Revit. also i need to have the precision of the “converted” dimension set at the nearest 1/2".
for example, I need to go from
4.56’ to 4’-6 3/4" (need to keep the “dash” as part of the dimension)
I did a search but have had no luck and unfortunately my programming skills are severely lacking.
You could try something like rounding your number to the nearest 1/2" (in decimal format) first. Then convert the decimal to inches, round that down to an integer, take the difference, and convert that to fractional inches.
Springs has a node that already does this to the nearest inch. You could use that as a guide as well.
Nice work, but I was not able to get that to work quickly, but I found (edit) “spring nodes” package has a node called Feet.ToFraction that works well. However you can not specify the precision, I assume it uses the project units precision.
many years late to the game but something like this is what you are looking for. In this line - round(aVSFParamVal, 3) the 3 stands for decimal places.