Get measurement value with JavaScript
Hi,
Is it possible to get measurement value from one page with JavaScript? If Yes, I want to add all the values up.
Thanks for help.
John
Hi,
Is it possible to get measurement value from one page with JavaScript? If Yes, I want to add all the values up.
Thanks for help.
John
Do you mean the value of a "Measurement" comment? If so, then yes, it's possible.
It's simply a Line annotation and the result of the measurement is its "contents" property.
So if you select it with the mouse and run this code:
selectedAnnots[0].contents
It will print out something like this:
Distance:
6.56 cm
Since it's two lines you can access just the second one like this:
selectedAnnots[0].contents.split("\r")[1]
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.