Level Elevations and weird fractions


See attached image.

I pulled all of the levels into Dynamo then ran the “GetParameterValueByName” on the Elevation. Notice that many of the elevations that were even inches in Revit start showing up with a 39/64" fraction at the end. Then I push that value back into a length parameter called “Project Elevation”. When the data gets back to Revit, the 39/64" is gone. What???

I’m glad that it somehow correct itself, but I’m uneasy about using the seemingly erroneous values to do any calculations in Dynamo before sending back (will the error still disappear, or will it show up once I “do math” to it?). Can anyone explain what is going on here? Interestingly, if I do Level.Elevation followed by Meters.Feet, I get doubles that are dead on accurate. That seems to point to something in either the feet’-inches" value conversion that is happening either in Dynamo or in Revit…

I can work around it, but I’d rather understand the “why” so I can be on the lookout for other places this might happen.

Level Elevations


So…I went on and put together a tool to convert the doubles that are accurate to a string formatted as #’ - #" to 1/256" accuracy. That seems to work and not have the weird fraction issues that were popping up. The reason I needed this solved was that I need to push the elevations as a string back to Revit since they are going into floors that are in a group (length parameters cannot vary by group instance, but text parameters can). If the initial values had been accurate I would not have had to go through the extra effort, but guess that’s life…