Hello Tracker Team,
I know there is an objected for the active tool of an opened pdf document (IPXV_Document):
https://sdkhelp.pdf-xchange.com/vi ... ActiveTool
https://sdkhelp.pdf-xchange.com/view/PXV:IPXV_Tool
I would like to change the current/active tool to the tool "cmd.zoomIn". Could you provide a short code snippet on how to that programmatically?
Thank you for your help!
Cheers,
Martin
Change active tool SOLVED
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.
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.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change active tool
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Change active tool
Hi Alex,
I'm closer to the solution. Using the line of code:
I'm not able to get the desired tool and the object is null.
gives me the id value 3864.
Am I using the wrong string value for the desired tool to set "cmd.zoomIn"?
I also tried this solution viewtopic.php?f=66&t=29809&p=119377&hil ... ol#p119377.
But it gives me a value out of expected bounds exception.
// Martin
I'm closer to the solution. Using the line of code:
Code: Select all
var tool = PxvInst.GetTool(PxvInst.Str2ID("cmd.zoomIn"));
Code: Select all
PxvInst.Str2ID("cmd.zoomIn")
Am I using the wrong string value for the desired tool to set "cmd.zoomIn"?
I also tried this solution viewtopic.php?f=66&t=29809&p=119377&hil ... ol#p119377.
Code: Select all
pdfCtl.Doc.ActivateTool(PxvInst.Str2ID("cmd.zoomIn"));
// Martin
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change active tool
Hello Martin,
You are specifying the name of the command, not the name of the tool.
Here's an old topic of yours, where you were also working with tools:
viewtopic.php?f=66&t=24223
As for this topic, the ID would be "tool.zoom"
Cheers,
Alex
You are specifying the name of the command, not the name of the tool.
Here's an old topic of yours, where you were also working with tools:
viewtopic.php?f=66&t=24223
As for this topic, the ID would be "tool.zoom"
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Change active tool SOLVED
Hi Alex,
thank you for the link and the correct string Id value. It's working now.
Cheers
Martin
thank you for the link and the correct string Id value. It's working now.
Cheers
Martin
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change active tool
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ