Page 1 of 1

Error GetAttachmentsCount

Posted: Thu Apr 22, 2021 12:23 pm
by cvpereira
Hi guys

I'm trying use the method "GetAttachmentsCount", but after execute "DoDocumentVerb", my variable "AttachmentsCount" have the value "Unknown type: 19", I can't say what I'm doing wrong. My code is bellow

Code: Select all

    var
        AttachmentsCount, DataIn: OleVariant;
        ActiveDocID: Integer;
                .
                .
                .
                .               
        PDFXCview.src  := CDSINIndiceTreeViewDes_Caminho_Arquivo.AsString;

        PDFXCview.GetActiveDocument(ActiveDocID);
        PDFXCview.DoDocumentVerb(ActiveDocID, '', 'GetAttachmentsCount', DataIn, AttachmentsCount, PXCVA_Sync or PXCVA_NoUI);                
I'm using Delphi 5, my application is 32 bit and the version of dll is 2.5.322.10

Re: Error GetAttachmentsCount

Posted: Mon Apr 26, 2021 12:46 pm
by Tracker Supp-Stefan
Hello cvpereira,

Have you seen this other topic with a code sample (in pseudocode) for the same:
viewtopic.php?f=36&t=11822&p=53204&hili ... unt#p53204
Does that help you get yours working and returning the correct value?

Kind regards,
Stefan

Re: Error GetAttachmentsCount  SOLVED

Posted: Thu May 06, 2021 3:10 pm
by cvpereira
Tracker Supp-Stefan wrote: Mon Apr 26, 2021 12:46 pm Hello cvpereira,

Have you seen this other topic with a code sample (in pseudocode) for the same:
https://forum.pdf-xchange.com/viewtopic.php?f=36&t=11822&p=53204&hilit=GetAttachmentsCount#p53204
Does that help you get yours working and returning the correct value?

Kind regards,
Stefan

Hi Stefan

Thank's for answer, to work around the problem, I used the command via javascript.

Code: Select all

 this.dataObjects.length 
instead using the "GetAttachmentsCount" command and worked properly

[]'s

Claudemir

Re: Error GetAttachmentsCount

Posted: Thu May 06, 2021 3:16 pm
by Tracker Supp-Stefan
Hello cvpereira,

Glad to hear you've found a solution!

Kind regards,
Stefan