ChangeDocImageEx

Changes Document Image.

Public Function ChangeDocImageEx(ByVal DocId As Long, ByVal FileName As String, ByVal sDocumentType As String, ByVal CreationDateTime As String, ByVal sThumbFileName As String, sISIndex As String) As Long

 

Parameters

In/out

Name

Data type

Description

In  

DocId

Long

Document Index

In

FileName

String

File path from where the new image of the document is to be fetched. 

In

sdocumentType

String

Type of Document

In

CreationDateTime

String

Date/Time of Creation

In

sThumbFileName

String

File path of the thumbnail image of the new document.

Out

sISIndex

String

Image Server index

 

Description

This function is used to change the image of the document. This function is called for the shared cabinet when the user is performing check In operation.

This function is also indirectly called from the ChangeDocImage

 

Return value

Name

Description

 1

In case of success

-3

Cabinet not connected.

 

Example

Changing document image and getting a new ISIndex

dim  udtDocument()                as TagDocument

dim  sFilename()                    as string  ‘ new image of document

dim  sThumbNailFilename()    as string  ‘ Thunmbnail of new image

dim  sISIndex                        as string   ‘ Image Server Index

dim gPDb                              as PanDb.pdbCls
dim lRetVal                            as Long

 

Set gPDb = New PanDb.pdbCls

Redim udtDocument(0)

udtDocument(0).DocumentId = 100   ‘ get document id

udtDocument(0).DocType = “TIF’   ‘ get document type

udtDocument(0).CreationDateTime = "12/03/2003"

 

sFileName = “C:\newImage.TIF”

sThumbNailFileName = “C:\thumbnailnewImage.TIF”

lRetVal = gPDb.ChangeDocImageEx(udtDocument(0).DocumentId, sFileName, udtDocument(0).DocType, udtDocument(0).CreationDateTime, sThumbnailFileName, sISIndex)

If lRetVal = NG_SUCCESS Then

      Msgbox “ Got image index of document “ &  sISIndex

      udtDocument(0).ISIndex = RTrimNull(sISIndex)

else

     Msgbox “ Error”

End If