• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

Custom Format for archictetural units in Form Field

New Here ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

Hello all,

 

Bluebeam related question here.  I'm running a calculation in a text box form field, and I want it to display the output in traditional fractional inches and feet format.  Cannot for the life of me find it anywhere on the web!  Essentially, if I have an elevation of "8853.9" outputting from the calculation, how do I write the script for the custom format to diplay this as 8,853' 10 13/16" ?

TOPICS
PDF forms

Views

184

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

LATEST

This is not a trivial conversion. The problem, is that the starting point is a potential irrational number, so there won't be a clean conversion.

 

Here is a page on a Math site that explains the conversion process:

https://www.calculatorsoup.com/calculators/math/decimal-to-fraction-calculator.php

 

Here's another page that shows a table conversion:

https://www.engineeringtoolbox.com/inches-decimal-equivalents-d_471.html

 

 It think the best strategy is a best match loop. Starting with the chunkier fractions first, then working down to finer grains until it's close enough.

 

  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines