@AttachmentLength
Syntax
@AttachmentLength(NOTEHANDLE1);
Description
Returns the sizes of the file attachments attached to the document with the NOTEHANDLE NOTEHANDLE1 as FLOATLIST back.
The order of the elements in the returned list is analogous to the order of the list returned by @AttachmentNames returns.
If no file attachment is attached, a FLOATLIST with 0 (zero) elements is returned.
The original size of the file attachments is always returned, not the size occupied by the file attachment in the document (compression is therefore not taken into account).
Example: @AttachmentLength(NOTEHANDLE1)
DBHANDLE1:=@OpenDB("TEST.NSF");
VIEWHANDLE1:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION1:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE1;VIEWPOSITION1;NOTEHANDLE1);
Count:=@Attachments(NOTEHANDLE1);
@LogReport("Number of attached files:"+@Text(Count));
FileNameList:=@AttachmentNames(NOTEHANDLE1);
FileLenList:=@AttachmentLength(NOTEHANDLE1);
@LogReport(FileNameList+"\t\t\t"+@Text(FileLenList));
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);
The result in FileLenList would be, if the following file attachments were attached to the document with the NOTEHANDLE NOTEHANDLE1:
FILE1.TST (1000 bytes) and FILE2.TST (12345 bytes):
1000:12345
Note : This text was machine-translated and may contain inaccuracies.
