Tuesday, April 10, 2007

Hide a folder in FileNet Capture 4.1

Following VB subroutine can be used to hide a particular node in Capture Tree View control....
[Pass the name of node to be hidden]

Public Sub HideANode(strNode As String)
Dim oRO As RepObject
Dim goRepServer As RepServer

Set goRepServer = CreateObject("FileNET.Capture.RepServer.1")

On Error GoTo ErrExit
If Not goRepServer Is Nothing Then

Set oRO = goRepServer.Sessions(0).Repository.Contents.Item(strNode)
If Not oRO Is Nothing Then oRO.Hidden = True
End If
ErrExit:
End Sub

Create a folder using VB code in FileNet Tree View

Select a node under which you want to create a new folder and use following code on some event....


Dim lResult As Long
Dim NewFolder As RepObject
Dim OldFolder As RepObject
Dim ParentObj As RepObject

'let the user know that we are doing something
Me.MousePointer = vbHourglass
'Validate the folder name
If txtFolderName = "" Then
'no name specified, so return error
MsgBox "Enter Folder name"
txtFolderName.SetFocus
'ElseIf InStr(1, txtFolderName.Text, "/", vbBinaryCompare) <> 0 Then
'the slash is not allowed in the name
ElseIf ValidateFolderName(txtFolderName.Text) = False Then
'MsgBox strInvalidName, , strCreateFolderTitle
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Else
'we have a good name
On Error GoTo ErrExit:

'we need to check if the name is already used
'Find the parent
Set ParentObj = Me.FNCaptureTree1.GetSelectedItem(0)
'see if there is a duplicate below the parent
Set OldFolder = ParentObj.Contents.Item(txtFolderName.Text)
If Not OldFolder Is Nothing Then
'we have a duplicate name so return an error
MsgBox "Duplicate folder is not allowed"
Set OldFolder = Nothing
frmCreateFolder.MousePointer = vbDefault
Exit Sub
End If

'create the new folder
Set NewFolder = ParentObj.Contents.Add("Folder", txtFolderName.Text)
'save it
lResult = NewFolder.Save
'unload our form

'refresh the treeview so the new folder shows up
Me.FNCaptureTree1.SelectItem ParentObj

End If
'let the user know were done
Me.MousePointer = vbDefault
Exit Sub
ErrExit:
txtFolderName.SetFocus
txtFolderName.SelStart = 0
txtFolderName.SelLength = Len(txtFolderName.Text)
Me.MousePointer = vbDefault

Copy any page at any location in FileNET Capture Control

'oPageSelected - is the selected page after which you want to copy a particular page(Say Barcode separator)

If Not oPageSelected Is Nothing Then
MsgBox "Page Name is " + oPageSelected.Name
End If
Dim oBarCodeSep As RepObject
Dim oRepServer As RepServer
Set oRepServer = CreateObject("FileNET.Capture.RepServer.1")

If Not oRepServer Is Nothing Then
Set oBarCodeSep = oRepServer.ObjectFromFullName "IS1:/BarCodePage")

Dim oDstParent As RepObject
Dim oRepObj As RepObject
Dim lResult As Long

Set oDstParent = oPageSelected.Owner
oDstParent.CopyFrom oBarCodeSep
Set oRepObj = oDstParent.Contents.Item(oDstParent.Contents.Count - 1)
lResult = oPageSelected.Move(oRepObj)
If lResult = 0 Then
MsgBox oRepObj.Name & strCanNotBeMovedTo & oDst.Name
Else

End If

End If

Monday, April 02, 2007

How to resolve 'Can not recognize format' FileNet DocProcessing Error.

Solution:

FileNet DocProcessing throws 'Can not recognize format' error when it does not find the enough free space on root drive.To resolve this error ensure the following things:
1). There must be enough space on C:\ drive.
2). Remove all the unnecessary files including Temporary files.
3). Restart the PC and try DocProcessing coponent on a batch.

Thursday, March 22, 2007

How to provide Magnifier for IDm Viewer Control?

Add the following line for your control's event to implement Magnifier functionality.

IDMViewerCtrl1.LeftButtonAction = idmActionMagnify

Sunday, February 04, 2007

Is FileNet CE 3.5.1 compatible with Citrix PS 4?

Problem : While trying to install FileNet Content Engine 3.5.1 client libraries on Citrix Presentation Server 4.0 it's corrupting ctxgina.dll after reboot.
Answer : As per FileNet,the installation of CE Client Libraries in any Citrix environment is not supported.

Saturday, January 13, 2007

Configure more than 1 barcode for docprocessing.

Query: Suppose your scanned page is going to containg more than 1 barcode and the barcode information is required to be used at the time of INDEXING, use following steps to do that,
Steps:
First scan one of that kind of page and put it under Settings Collection to be used.Make sure that the page you place should be the first one in sequence under settings collection.Configure docprocessing component for it.After that configure Indexing Component. Select the field you want to configure and click 'Configure'. Select 'AutoIndex' tab. Now configure 'SelectPage', SourceGroup( Say Barcode) and then click 'Append AutoIndex String'.

Thursday, December 28, 2006

Diff between Image Server and Content Engine.

Ist Deifference
IS (Image Service) is just Document and Image Repository server, Where as P8-CE (Content Engine) is just one module out of 8 modules. which is more advance to IS. CE include all major functionality of IS. But P8 has 7 more modules like Process
Automation or PE(Process Engine), AE( Application Engine) etc..
Second Diff
Actually Image Service is the base of P8 and the rappers are different 8 modules. More over when you install PE Process IS gets installed. So if you are planning to upgrade from IS to P8 you need basic 3 components CE, PE, AE, and for web access to Content module and process modules you need either of the following JBoss, WebLogic, Web Sphere or Tomcat Application Server. Of course Database in the vital part of any FileNet. Yes, you can access content stored in IS from Java, you can also use ISRA. For that while installing AE you need to execute the AE setup for ISRA instead of general AE. There are 2 setup available for AE one is simple and other is ISRA support.

Is it possible to add more than one CS 5.2 library on the same?what are precautions and limits?

We can have up to 12 libraries on a CS server.

How to generate BarCode?

Open MS WORD and write any thing like number or text (of length 9). selected the written text and change its font to any of the following
IDAutomationHC39L, IDAutomationHC39M
It will display the corresponding barcode.
[Note: If you don't have these Fonts installed on your PC just downloand them from http://www.idautomation.com/fonts/free/ ]
--------------------------------------------------
IDAutomation's Free Code 39 Barcode Font allows the ability to print letters, numbers and some symbols with the Code 3 of 9 symbology. TrueType and OpenType versions are provided.

Error "COMMITTAL NOT ALLOWED." - Capture 4.1

Problem :
I have designed a python application(run as a service) for automating Capture Process. I used FileNet capture components.This application was built to perform all the steps staring with FileImport then Assembly,Indexing and finally Commit.The documentclass which I was using has 2 required fields.I was setting the values for the mandatory index fields in code but it was just opening the Index window and waiting for user to manually index the batch.In code there was Commit step after Indexing. As indexing window was not getting closed automatically so Indexing was not completed. And just after I was executing commit component and getting error "COMMITTAL NOT ALLOWED.All documents in the batch have not been indexed.".
solution :
I analize the problem and came to know that I was not checking 'Process documents using initial values above (i.e without user input)' option of Indexing component. Once I checked it and again started application It has started working

How to convert a colored BMP to Black & White BMP?

Solution 1 : For Windows 2000,2003,XP
1)Create a Python script and compile it.Script Code is given below:

import sys
import Image
import imageop
# open an image file you have in the working folder
im1 = Image.open(sys.argv[1])
str1=im1.mode
print str1
im2=im1.convert("1")
im2.save(sys.argv[1])
str2=im2.mode
print str2

2). Create abatch file and pass Image FileName as a paramter and get the desired result. [Batch File Contents are give n below]

@echo off
c:\python23\python.exe C:\PythonScript\Imaging.py %1
Pause

-- YOU CAN NOW EXECUTE THIS BATCH FILE ON COMMAND LINE AS WELL AS FROM YOUR CODE. --

Solution 2 : (For Windows 98,2000 and 2003 Not for Windows XP)[Less successful option]
1) For converting Colored BITMAP image to Black & White BMP. Just download Image Magic software from
ftp://ftp.fifi.org/pub/ImageMagick/binaries/ImageMagick-6.3.0-7-Q16-windows-static.exe

2)Install it and you will find one file 'Convert.exe'.Run this line from command line by passing valid parameters as shown below:

"C:\Program Files\ImageMagick-6.3.0-Q16\convert.exe" -colors 255,255,255 %1 %2

a) First part specifies the path of convert.exe.
b) '-colors 255,255,255' argument is to convert a Colored BMP to B&W BMP.
c) %1 - Name of file (e.g c:\test.BMP)
d) %2 - Name of same file (e.g c:\test.BMP)

Note : Before running Convert.exe make sure that your BMP file's Color attribute(MSPAINT->Image->Attributes)is set to Color.

Get Capture 5.0 Patch.

visit at ftp://guestuser:patches@ftp.eng.filenet.com
/softwarepatches/panagon/Capture/5.0.0/CAP-5.0.0-005

HOW TO USE ZONAL OCR

Use following code for the same
Public Function Execute(oBatch As RepObject) As Long
Dim workarray(1 To 1) As RepObject
Dim iResult As Long
Dim bShowForm As Boolean

DoEvents

Dim intZoneID As Integer
Dim lngLeft As Long
Dim lngTop As Long
Dim lngRight As Long
Dim lngBottom As Long
Dim lngReq1 As Long
Dim lngReq2 As Long

With OCR1 - This is the zonal ocr component

Set .CurrentObject = oBatch
.Load oBatch

DoEvents
DoEvents
DoEvents

Set workarray(1) = oBatch

intZoneID = 1
lngLeft = 1988
lngTop = 392
lngRight = 2438
lngBottom = 467
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 2
lngLeft = 902
lngTop = 446
lngRight = 2432
lngBottom = 521
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 3
lngLeft = 908
lngTop = 518
lngRight = 1607
lngBottom = 607
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 4
lngLeft = 905
lngTop = 593
lngRight = 1619
lngBottom = 686
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

intZoneID = 5
lngLeft = 392
lngTop = 2771
lngRight = 774
lngBottom = 2885
lngReq1 = 0
lngReq2 = 0
.SetOcrZone intZoneID, lngLeft, lngTop, lngRight, lngBottom, lngReq1, lngReq2

.VerifyMode = vmVerifyWords
.OCRVerification = False

.AutoLoadSettings = False
.Reset

End With

If OCR1.OCRVerification Then
bShowForm = True
Me.Show vbModal
End If

State = "Execute"

iResult = OCR1.Execute(workarray)

DoEvents
DoEvents
DoEvents

State = "Idle"

If bShowForm Then
'Me.Hide
End If

Execute = iResult
'MsgBox iResult

End Function

**********************************************************

This is where the OCR values are picked up and assigned to text boxes on the form.

**********************************************************
Set oRepObject = gobjCurrentDoc.Contents(gintCurrentPageNo - 1)
Call frmZonalOCR.Execute(oRepObject) '- Calling above function

If oRepObject.NodeId = fnniPage Then
Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue1")
If Not oAttr Is Nothing Then
'MsgBox "First OCR Value " & " is " & CStr(oAttr.Value)
txtIndex(1).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue2")
If Not oAttr Is Nothing Then
'MsgBox "Second OCR Value " & " is " & oAttr.Value
txtIndex(2).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue3")
If Not oAttr Is Nothing Then
'MsgBox "Third OCR Value " & " is " & oAttr.Value
txtIndex(3).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue4")
If Not oAttr Is Nothing Then
'MsgBox "Fourth OCR Value " & " is " & oAttr.Value
'txtIndex(4).text = CStr(oAttr.Value)
End If

Set oAttr = oRepObject.Attributes("UserDefined", "OCRValue5")
If Not oAttr Is Nothing Then
'MsgBox "Fifth OCR Value " & " is " & oAttr.Value
txtIndex(5).text = CStr(oAttr.Value)
End If
End If

Tuesday, November 28, 2006

What is the maximum limit of Pages/Batch in CE?

CE supports 5000 pages per batch. A batch may contain 5000 sigle page tiffs or 5 multi page tiffs containing 1000 pages each.

What is cross committal in a multi-IDMIS FileNet environment

When defining a batch, you select a batch entry service that controls
scanning, indexing, and committal. You can select a batch service on
your own local system or on a remote system.
Normally, a batch entry service resides on the system that receives the
documents. Alternatively, your support representative can configure a
batch service to commit the documents to another system. This is
cross-system committal.

For example, you can scan and index on system A, but configure
system A to commit the documents to system B. The names of the
document class, media family, and common indexes must be the same
on both systems. Otherwise, the retention parameters are taken from
system B, while media family name and document class security are
taken from system A.

Wednesday, November 15, 2006

Which one is better? To use 'DocProcessing' or 'Scan' component's settings for detecting barcode?

Its better to configure 'DocProcessing' Component settings to detect Patchcode/Bar code.

Capture with CE

Before assembly Merge component should be executed to create multipage tif as CE does not support Document conating multiple pages while IS does.

Tuesday, October 24, 2006

Delete Files from a particular directory using VB 6.0

Problem when an external apps stores big documents into CE

PROBLEM : How to make external applications store the big monster documents into Content Engine.SOAP does not seem to be the best choice here. Sending files as reference in a SOAP message seems to be a good way but then there are problems with the either using FTP or MQ considering various things: a) Response time. b) Guarantee delivery of the message, etc.
SOLUTION : In order to deal with big files one of the sophisticated way is to use WebDev ( Web Distributing Authoring and Versioning) it is kind of protocol which is used while you map your network drives on Windows based operating systems.FileNet WebDev comes as an Add on and requires IIS to run. It has some limitations.