Wednesday, December 26, 2007

FileNet Capture 'Unable to save tiff rotaion for Faxes'

Problem: User is unable to save rotaion of Fax Images but has no problem with scanned one.

Reason: The possible reason for getting this error is because Fax image is not being in Group 4 format. So when user tries to chage and save rotation of Fax Images get this error.

Solution 1 : Check the configuration settings on Fax Gateway server.We solved this problem by changing the Incoming 'Fax Image format' from 'CCITT Group 3' to 'Group4'

Group 4 = Standard Tiff supported by FileNet Capture. User can change and save rotation for these images.

Solution 2 :If the first solution does not work then the problem is due to unavailability of 'Orientation' tag for the Tiff image. If this tag does not exists and user tries to save orientation we may get this error.

Tuesday, December 04, 2007

Send Keys Constants

VB: SendKeys Statement

Sends one or more keystrokes to the active window as if typed at the keyboard.
Syntax: SendKeys string[, wait]
The SendKeys statement syntax has these named arguments:

String expression (required) specifying the keystrokes to send
Wait (optional) Boolean value specifying the wait mode. If False (default), control is returned to the procedure immediately after the keys are sent. If True, keystrokes must be processed before control is returned to the procedure.
Remarks

To represent ABC abc 123 use "ABC abc 123" for string.

The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) are considered special characters. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when dynamic data exchange (DDE) occurs. To specify brace characters, use {{} and {}}.

To specify non printing keys such as ENTER or TAB, and function keys:

BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER} or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS or INSERT {INSERT} or {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1-F16 {F1}-{F16}
To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

SHIFT = +
CTRL = ^
ALT = %

Combination Keys: To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to hold down SHIFT while E and C are pressed, use "+(ec)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+ec".

Repeating Keys: To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 25} means press the LEFT ARROW key 25 times; {h 15} means press the H key 15 times.
Note: You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. SendKeys also can not send the PRINT SCREEN key {PRTSC} to any application.

List Commands with SendKeys using:

UtilityProvider.ContextValue(_ValueIndex)
ListVarx
ValueIndex is a zero based index for parameter retrieval, x is a one based index for parameter retrieval.
Examples for "Move <1to5>" command where contains UP, DOWN, RIGHT, LEFT and <1to5> contains 1,2,3,4,5

UtilityProvider.ContextValue(ValueIndex) example
SendKeys "{"+UtilityProvider.ContextValue(0)+" "+UtilityProvider.ContextValue(1)+"}"
ListVarx example
SendKeys "{"+ListVar1+" "+ListVar2+"}"

Parameter Conversion and Control Blocks

Convert Parameter to Number Value: block& = val(_arg1)
Convert Number Value to text (CStr(): SendKeys "{Enter}{Up "+CStr(block&)+"}"

If Statement:

if block& = 0 then
sline = "{Shift+End}"
else
sline = "{Shift+Down "+CStr(block&)+"}{Shift+End}"
end if

While Statement

block& = val(_arg1)
loop& = block&
while ( loop& )
Sendkeys "{End}{Enter}"
loop& = loop& - 1
wend

Substring Search Syntax
for list format "Written\Spoken"

Lc% = Instr(_arg1,"\") - 1
TextVal$=MID$(_arg1,0,Lc%)
SendKeys TextVal$

Diagnostic Example: Test List
SendKeys "1. Selected value:{Enter}"
SendKeys ListVar1
SendKeys "{Enter}2. Count to divisor:{Enter}"
Lc% = InStr(ListVar1,"\")
SendKeys CStr(Lc%)
SendKeys "{Enter}3. Count to cutoff:{Enter}"
Lc% = Lc% - 1
SendKeys CStr(Lc%)
SendKeys "{Enter}4. Resulting Value:{Enter}"
TextVal$=Mid$(ListVar1,1,Lc%)
SendKeys TextVal$
SendKeys "{Enter}Command Complete.{Enter}"

Thursday, November 22, 2007

How to fix 'COM Makepy utility' error in Python 2.3.3?

Problem Description :
I have been using Python 2.3 for last 4-5 months without any problem. Today, I have tried installing Python 2.3.3 as well as Python 2.3 pywin32 extensions on Windows 2000 Server. But when I tried to Run 'COM Makepy utility' in PythonWin editor, I got error 'Error executing COM Makepy utility' and no dialog box appeared to allow me to create py equivalent.This is the first time I have received this error. Because of this I am unable to run my application. The same code is running on other Windows XP, 2K and 2003 server machines. I don't understand why this error has started appearing.

Solution:
Please make sure you are using build 210 of pywin32 (see sf.net/projects/pywin32).
Run pywin32-210.win32-py2.3.exe file on the affected pc.

Tuesday, November 20, 2007

Visual Basic 6.0 error 'The memory could not be "read"'.

Problem :The instruction at "0x73d71805" referenced memory at "0x00000000". The memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program

Solution:
To work around this problem, remove all blank lines that are present before any conditional compilation directives in your Visual Basic 6.0 code.

Thursday, September 13, 2007

How can one processmap can call another processmap using process API?

Problem description : if we create two process maps P1 (with steps: Step1, Step2 and Step3) and P2 (with Step5). There are two separate process maps and not sub-maps. Call P2 process map from Step1 of P1 using process service API. Is that possible and if yes what happens to P1 at the time of calling P2. And when P2 is completed what happens to P1 then.
Answer: There is no need to use process API for the same. One can leverage workflow Create function from the process map itself for launching P2. They will be 2 independent processes but if you want to establish a link between these 2 processes then put P1 on WaitForCondition till completion of P2.

Wednesday, June 06, 2007

A good link for script code

http://www.microsoft.com/technet/scriptcenter/resources/qanda/may07/hey0524.mspx

Wednesday, May 30, 2007

Write formatted text in a spreadsheet using VB 6.0

Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim rowNum As Integer

Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Add()
rowNum = 2
'Specify your worksheet name
Set ws = wb.Worksheets(1)

ws.Name = "BoxCheckReport"
ws.Range(Trim("A1")).Value = "Account No" 'First header row value
ws.Range(Trim("A1")).EntireRow.Font.Bold = True
ws.Range(Trim("A1")).EntireRow.Font.Color = vbBlue
ws.Cells.EntireColumn.ColumnWidth = 25
'ws.Columns.Column(1

ws.Range(Trim("A:A")).NumberFormat = "#####################"

'Set horizontal alignment to Left
xlApp.Range("A:A").HorizontalAlignment = 2
xlApp.Range("B:B").HorizontalAlignment = 2
xlApp.Range("C:C").HorizontalAlignment = 2
xlApp.Range("D:D").HorizontalAlignment = 2


ws.Range(Trim("B1")).Value = "Entry Date" 'header row value
ws.Range(Trim("C1")).Value = "Doc Type" 'header row value
ws.Range(Trim("D1")).Value = "Doc ID" 'header row value

ws.Range(Trim("A2").Value = "1010101010"
ws.Range(Trim("B2").Value = "01/01/02"
ws.Range(Trim("C2").Value = "NAP"
ws.Range(Trim("D2").Value = "001"

wb.SaveAs "c:\ExcelReport.csv"
If Not ws Is Nothing Then
Set ws = Nothing
End If
If Not wb Is Nothing Then
wb.Close
Set wb = Nothing
End If
If Not xlApp Is Nothing Then
xlApp.Quit
Set xlApp = Nothing
End If

'After writing text in the spreadsheet just open it for User to view
ShellExecute 0, vbNullString, "c:\ExcelReport.csv", vbNullString, vbNullString, vbNormalFocus
-----------
OTHER LINKS
-----------
http://www.codeproject.com/vbscript/AssetScan.asp?df=100&forumid=188977&exp=0&select=1268478
http://www.codeguru.com/vb/gen/vb_misc/tips/article.php/c8227/

Sunday, May 27, 2007

FileNet P8 4.0 Features

Core P8 4.0 Features:

• J2EE Content Engine on 5 platforms (Windows, AIX, Solaris, HP-UX, Red hat Linux and Suse Linux)
• Scalability improvements (farming and clustering)
• Compound document framework
• Security enhancements
• Enterprise site topology
• Distributed content caching
• CFS-IS, Annotation Support
• Multilingual AE/PE (dynamic handling of multiple languages on single engine)
• Complete .NET API for CE
• BPMN (import of visually developed business processes)
• Content Streaming API
• Process Analyzer enhancements
• Business Process Modeling Notation (BPMN)
• Enabling transition of eProcess and VW apps to BPM
• Single Sign-On Framework
• Netegrity support
• IBM Directory support
• AD Multi-Forest support
• Removing hard-coded users/groups
• Installer improvements
• Oracle 10g and 10g RAC support
• HP Itanium – Integrity Server support

P8 Platform 4.0 Security Enhancements

• Unified P8 Directory Service Provider
• Single Sign-On Framework
• Support for IBM Directory (suprise!)
• Active Directory Multi-Forest
• No AD dependency for non AD LDAP system
• No Enterprise Manager or Capture AD domain membership requirement

.NET Development in P8 4.0:

• Extending CE ability to service Microsoft .NET developers
• 4.0 includes a complete .NET API for CE
• C# representation of the CE object model
• .Net 2.0 Framework compatible

Thursday, May 03, 2007

How to get a stamp on the page after being scanned?

'STAMPER' property of Scan component can be set to write a particular Text/String on the page after its been scanned. Show 'Scan' properties of a settings and goto 'Stamper' tab and configure whatever string you want to configure.

'Server batch cache is FULL!' error while committing batches using FileNet Capture 4.1

This error(Error tuple is 77,0,8)occurs if we have an application which is trying to commit number of batches using Capture. The solution is to wait for some time untill all the batches in BATCH CACHE are committed. Start using FileNet Capture 4.1 after some time. This should work fine. More information on this error can be found on FileNet site http://www.css.filenet.com/

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'.