Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

GetDocumentSize

Use this function to return the document size in memory. The document must be loaded into memory, and saved if contents have been modified, when this function is called. The size of a text file in memory is not necessarily the same size as on a file system. If you require the size of a document on the file system, use the function GetFileSize. The GetDocumentSize function is useful when creating Solution-level REST APIs that may be called by third-party applications. In this case, it can be used to set the content-length header for the REST API. For more information see "Providing REST APIs" in the Longview Integration Guide.

Syntax:

GETDOCMENTSIZE("DocumentName")

where:

  • DocumentName is the name of the text document enclosed in quotes.

Syntax example:

Set Variable size = GetDocumentSize("$LVS_APIOutputFile$")

Published:

GetDocumentSize

Use this function to return the document size in memory. The document must be loaded into memory, and saved if contents have been modified, when this function is called. The size of a text file in memory is not necessarily the same size as on a file system. If you require the size of a document on the file system, use the function GetFileSize. The GetDocumentSize function is useful when creating Solution-level REST APIs that may be called by third-party applications. In this case, it can be used to set the content-length header for the REST API. For more information see "Providing REST APIs" in the Longview Integration Guide.

Syntax:

GETDOCMENTSIZE("DocumentName")

where:

  • DocumentName is the name of the text document enclosed in quotes.

Syntax example:

Set Variable size = GetDocumentSize("$LVS_APIOutputFile$")

For an optimal Community experience, Please view on Desktop