Installation
Download and extract the zip file, and copy to %APPDATA%\Tracker Software\PDFXEditor\3.0\Javascripts
Detailed instructions in post viewtopic.php?p=196006#p196006
Usage
The tool adds a button to the Add-Ons toolbar: Select all the measurements to add a text tag to, then run the tool. It will add a text 'tag' (label) with the measurement at the center of the area: The tag can be moved/formatted as needed. If you change the measurement markup, you can select the measurement and run the tool again and it will update the tag: Form Output
The tool can also output the area to form fields. Once a form field is linked to an area, the tool will not add new ltags, so if you want area tags also, first run the tool on the measurements to add the tags, then link to form fields.
To link a form field, copy the Name of the area, and paste it as the Field Name for a Text Field. If you want, add a more descriptive name to the Tooltip: Then select all the areas and run the tool. It will copy the areas to the linked form fields. I've added a calculated form field at the bottom that sums all the areas (PDF XChange is smart enough to recognize the numbers, so isn't thrown off by the units): The form fields do not have to be on the same page as the measurements, but watch out: If measurement markup names are duplicated on other pages (ie by copy-paste of the markup), they will also update the same field.
Compatibility
[edit] I just realized that .inReplyTo property has been supported all the way back to PXCE 9.5, so if you CTRL-drag to copy an area, it will duplicate the tag with it. So, if you've made a special formatting for one tag, you can CTRL-drag to copy that measurement and it will copy the formatted tag along with it. Feels very "built-in".
Limitations
- The tool is adding a text box annotation, and setting the inReplyTo attribute to link it to the measurement. If you delete the measurement, it will also delete the text box.
- The text box can be edited just like any other markup. The script uses a regular expression to try to just change the dimension when updating, but may get confused if you add a number followed by text.
- If there's a label on the measurement, it will get copied to the text box, and will always be on a separate line, because the tool is copying the contents of the measurement: