annotation set_actions in vb.Net

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
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

annotation set_actions in vb.Net

Post by EricAriens »

Hi,

I got some example code from you guys in c#. No problem with it.
Now I want to translate the code to vb.Net and one method does not exists int vb.Net(method set_Actions().
This is the code I got from you:

Code: Select all

//Filling the annotation with needed text
PDFXEdit.IPXC_ActionsList AL = pdfCtl.Doc.CoreDoc.CreateActionsList();
AL.AddURI("https://www.google.nl");
pAnnot.set_Actions(PDFXEdit.PXC_TriggerType.Trigger_Up, AL);
This is what I made of it. Is this correct?

Code: Select all

pAnnot.Actions(PDFXEdit.PXC_TriggerType.Trigger_Up).Add("https://www.google.nl")
I already found out it is not. "pAnnot.Actions(PDFXEdit.PXC_TriggerType.Trigger_Up)" is Nothing so this is not the solution.

Code: Select all

annot.Actions(PDFXEdit.PXC_TriggerType.Trigger_Up) = pdfCtl.Doc.CoreDoc.CreateActionsList()
Does not instantiate the trigger_up actions.


Regards
Eric
Last edited by EricAriens on Mon Jul 04, 2016 11:40 am, edited 1 time in total.
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: annotation set_actions in vb.Net

Post by EricAriens »

Hi,

The same goes for method set_Border() on IPXC_AnnotData_Link

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

Re: annotation set_actions in vb.Net

Post by Sasha - Tracker Dev Team »

Hello Eric,

The problem is how the C# interprets our dll's interfaces' properties when you add it as a reference to the project. Judging from your tests, the vb.net and C# declaration sometimes can differ. That is a known problem and what you've written should be correct if it compiles and works.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
EricAriens
User
Posts: 130
Joined: Tue May 03, 2016 1:11 pm

Re: annotation set_actions in vb.Net

Post by EricAriens »

Hi,

I have some more information.
The proper way to initialize is the next:

Code: Select all

Dim actionList As IPXC_ActionsList
actionList = PDFViewer.Doc.CoreDoc.CreateActionsList()
actionList.AddURI(url)
annot.Actions(PDFXEdit.PXC_TriggerType.Trigger_Up) = actionList
Assigning the CreateActionList() to the Actions does not work.

Code: Select all

annot.Actions(PDFXEdit.PXC_TriggerType.Trigger_Up) = PDFViewer.Doc.CoreDoc.CreateActionsList()    <-- This does not work (no compile errors)
Regards
Eric
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: annotation set_actions in vb.Net

Post by Sasha - Tracker Dev Team »

Hello Eric,

This behavior occurs because you're assigning an empty list.

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