Fetched the distance value to the text box in C#

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

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.
Post Reply
markdhem
User
Posts: 5
Joined: Fri Jun 29, 2018 6:42 am

Fetched the distance value to the text box in C#

Post by markdhem »

Hi, how can I fetched the value of the distance tool once I finished dragging the second point?


Thank you and God Bless.

Mark
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fetched the distance value to the text box in C#

Post by Sasha - Tracker Dev Team »

Hello Mark,

You can catch the e.operExecuted event and see whether this was an annot.setData operation:
https://sdkhelp.pdf-xchange.com/vi ... ot_setData

If so, then you'll need to get the annotations from the operation's input and see whether there are any annotations with the LineDimension type atom. If so, then you will have to get the IPXC_AnnotData_Line from the IPXC_Annotation data and check the Measure property. Get the IPXC_MeasureRL interface from it and there you will have the data that you need.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
markdhem
User
Posts: 5
Joined: Fri Jun 29, 2018 6:42 am

Re: Fetched the distance value to the text box in C#

Post by markdhem »

Hi Alex,

Thank you for the answer, but I still don't get it. Is annot.setData can be stored into the textbox or in the database, if so what method would I use?
Can you please give me an example too because I'm still new with this field.

Mark
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fetched the distance value to the text box in C#

Post by Sasha - Tracker Dev Team »

Hello Mark,

Have you tried the FullDemo application? And I was referring to:

Code: Select all

int nID = Inst.Str2ID("op.annot.setData", false);
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
markdhem
User
Posts: 5
Joined: Fri Jun 29, 2018 6:42 am

Re: Fetched the distance value to the text box in C#

Post by markdhem »

Hi Alex,

I've tried the full demo but it's really hard for me to understand all of the methods.
Thank you for your patience Alex.

Mark
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fetched the distance value to the text box in C#

Post by Sasha - Tracker Dev Team »

Hello Mark,

Start from the pdfCtl_OnEvent method, there you should catch the event that I mentioned. Also, do not forget to add it to the IDS enum.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
markdhem
User
Posts: 5
Joined: Fri Jun 29, 2018 6:42 am

Re: Fetched the distance value to the text box in C#

Post by markdhem »

Hi Alex,

Can you please give me some example because I'm finding a hard time on doing this, I feeling useless right now.
Thank you.

Mark
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fetched the distance value to the text box in C#

Post by Sasha - Tracker Dev Team »

Hello Mark,

Have you managed to find the method that I mentioned in the FullDemo application?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
markdhem
User
Posts: 5
Joined: Fri Jun 29, 2018 6:42 am

Re: Fetched the distance value to the text box in C#

Post by markdhem »

Hi Alex,

Yes, I find the method from the Full Demo.


Mark
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fetched the distance value to the text box in C#

Post by Sasha - Tracker Dev Team »

Hello Mark,

Here's a code snippet that you can use:
viewtopic.php?f=66&t=31055&p=124996&hil ... te#p124996

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply