IPXV_Document ActivateTool  SOLVED

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
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

IPXV_Document ActivateTool

Post by zarkogajic »

I'm trying to activate a tool other than the default "hand" tool.

PXV_Control1.Doc.ActivateTool(X)

For any X, the above line fails with an error message dialog: "the directory cannot be found in the cache."

Help page does not help much: https://sdkhelp.pdf-xchange.com/vi ... tivateTool

p.s.
I can enumerate Tools by PXV_Control1.Inst.Tools[] and get see their names - but am unsure what nToolID should be used for the tool I want to activate.

-žarko
Artsiom
User
Posts: 14
Joined: Fri Aug 23, 2019 7:22 am

Re: IPXV_Document ActivateTool

Post by Artsiom »

Hi, zarkogajic!

I asked recently about this.
I change tools like this:

Code: Select all

control.Inst.ExecUICmd("cmd.tool.hand");
You can see the needed command ID by the End-User Editor!

Image

Hope it works for you!
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_Document ActivateTool

Post by zarkogajic »

Thanks, I figured it out :)

Still, does that mean the ActivateTool does not work?

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

Re: IPXV_Document ActivateTool

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Here's a topic that should help
viewtopic.php?f=66&t=31432&p=127209&hil ... ol#p127209

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_Document ActivateTool

Post by zarkogajic »

Hi Alex,

Missing link ?

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

Re: IPXV_Document ActivateTool

Post by Sasha - Tracker Dev Team »

Updated
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_Document ActivateTool

Post by zarkogajic »

HI Alex,

Thanks, that I guess works in the same way as ExecUICmd does.

Is ActivateTool really meant to be used in that way? I mean the sdkHelp does not mention this at all. Also, what should "PXV_ActivateToolFlags" be used for (enum with only one value)?

However, the following ends in null value for aTool (so cannot use):

integer nToolID = PXV_Control1.Inst.Str2ID('cmd.tool.hand', false);
IPXV_Tool aTool = PXV_Control1.Inst.GetTool(nToolID);

Then, the following ends with an error message "the directory cannot be found in the cache"

integer nToolID = PXV_Control1.Inst.Str2ID('cmd.tool.hand', false);
PXV_Control1.Doc.ActivateTool(nToolID);

So, not sure what how to use ActivateTool (in combination with GetTool and Inst.Str2ID)?


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

Re: IPXV_Document ActivateTool

Post by Sasha - Tracker Dev Team »

Hello žarko,

There is a same mistake in the topic I gave you earlier:
viewtopic.php?f=66&t=31432&p=127209&hil ... ol#p127209

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: IPXV_Document ActivateTool  SOLVED

Post by zarkogajic »

Hi Alex,

Yes, sorry, my bad. Trying to evaluate various things - so being to fast ...

Anyhow, using "tool.hand" works!

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

Re: IPXV_Document ActivateTool

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply