ISLibraryDocument.TypeCode

Description

The code of the library document type.

Syntax

object.TypeCode

Part Attribute Type Description
object Required
The object always implements the ISLibraryDocument interface
Restriction: This property is readonly.

Return Value

string

Example

Display some information about the library document, including the code of its type.

sub main
  Dim aLibName
  Dim aLibrary
  Dim aSubLib
  
  aLibName = InputBox("Enter the name of the library category:")
  'for example, "Patient information"
  if aLibName = "" then exit sub
    
  Set aLibrary = Profile.LoadRootLibrary
  set aSubLib = aLibrary.GetSubLibraryByName(aLibName)
  
  if aSubLib is nothing then
    Profile.MsgBox("The library with the specified name does not exist")
    exit sub
  else
    Dim aDocs, aDoc 
    Dim aInfo
    Dim i
     
    set aDocs = aSubLib.GetDocuments  
  
    aInfo = aSubLib.Name & " category has " & aDocs.Count & " documents: " & vbNewLine 
    
    for i = 0 to aDocs.Count - 1
      set aDoc = aDocs.Item(i)
      aInfo = aInfo & (i + 1) & ") " &_
        aDoc.Name & vbNewLine & vbNewLine &_
        "    The GUID of the document: " & aDoc.GUID & vbNewLine &_
        "    The OID of the document: " & aDoc.OID & vbNewLine &_
        "    The PartitionId: " & aDoc.PartitionId & vbNewLine &_
        "    The type of the document: " & aDoc.TypeDescription & vbNewLine &_ 
        "    The type code of the document: " & aDoc.TypeCode & vbNewLine &_
        "    Is New document: " & aDoc.IsNew & vbNewLine &_
        "    The length of Base64 content: " & Len(aDoc.ContentAsBase64) & vbNewLine & vbNewLine
    next     
    Profile.MsgBox(aInfo)  
  end if                       
    
end sub
Note:

In Profile Client v8 on User Interface Type Code can be found in Maintain > Library > Document list > Type.

Version information

Added in v7.8.0