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

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.