How do I convert a decimal from decimal inches to factional inches? I’ve tried the following code using python. LengthString does give me the length in fractional inches but I do not want the units. Is there a way using LengthValue to get only the numeric (fractional) part of the length without the units? Is there another class that I could use in Python to get this? How does the distance command work in Rhino where you can change the units?
dec = 5.875
tempLV = Rhino.LengthValue.Create(dec, us.Inches, Rhino.LengthValue.StringFormat.CleanProperFraction)
print tempLV.LengthString
1 post - 1 participant