What would be the proper way to alter the Target of an existing GoToR action?
So, I have a Link annotation and it has a GoToR action. To get the target document I'm using:
Code: Select all
act : IPXC_Action;
fileSpec : IPXC_FileSpec;
pdfLinkTarget : string;
...
fileSpec := IPXC_Action_Goto(act).Target;
pdfLinkTarget := fileSpec.FileName;
I need to change the target for that action to "c.pdf".
Target (IPXC_FileSpec) property of IPXC_Action_Goto is settable - but I'm not sure how to go from "c.pdf" to IPXC_FileSpec ? That is: how to convert a relative file name to IPXC_FileSpec ?
p.s.
I see IPXC_Document has CreateFileSpec returning IPXC_FileSpec needing IAFS_Name.
I've tried using IAFS_Inst.DefaultFileSys.StringToName('c.pdf', 0, null);
but this fails with "the parameter is incorrect".
Seems like DefaultFileSys.StringToName expects the full file name.
-žarko