Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been working on a sheet metal rule to get the flat extents. I found some code that does exactly what I need except it is formatted as a fraction.
I figured with a little research I could figure out how to change the formatting to what I need. I failed miserably.
The best I can do is remove the rounding function shown. Once removed, I get a value to six decimal places and leading zeros (0.980178).
Is there a way to format the "SheetMetal.FlatExtentsLength" and "SheetMetal.FlatExtentsWidth" as a formatted decimal or text, instead of a fraction?
I just need three decimal places and suppress the leading zeros.
LengthFrac = RoundToFraction(SheetMetal.FlatExtentsLength, 1/16, RoundingMethod.Round) WidthFrac = RoundToFraction(SheetMetal.FlatExtentsWidth, 1/16, RoundingMethod.Round)
Dewayne
Inventor Pro 2023
Vault Pro 2023
Inventor Pro 2023
Vault Pro 2023
Solved! Go to Solution.