Manually change measure text

PDF-XChange Editor SDK for Developers

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
lidds
User
Posts: 540
Joined: Sat May 16, 2009 1:55 pm

Manually change measure text

Post by lidds »

Is there away that I can change the value/text of the distance tool via code.

I have users who want to use the distance tool to show measurements on a drawing, however this drawing is not to scale. Therefore they would like to place the measure annot and then be able to change the distance shown.

I know that you have the Edit Label feature, however this shows text above the dimension.

Thanks in advance

Simon
lidds
User
Posts: 540
Joined: Sat May 16, 2009 1:55 pm

Re: Manually change measure text

Post by lidds »

Hi, I was wondering if anyone from tracker software could help me with this question.

Thanks

Simon
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12656
Joined: Wed Jan 03, 2018 6:52 pm

Re: Manually change measure text

Post by Daniel - PDF-XChange »

Hello, lidds

No, there should not be a way to do this programmatically. This is because the PDF specification defines that all measurements must display a calculated value with a relevant scale recorded in the annotation (though in theory you could change the scale property of the annotation, I am not certain how you would go about allowing a user to enter a line distance value, and then internally calculate the appropriate scale for that object).
As such, I might suggest that user place an normal line tool, and add the necessary endcaps for appearance, and inline text as desired.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com