Description:
I have erwin DM 64-bit, but my Excel is 32-bit. When running the API code, I get the following error " Can't find Project or Library" or run time error " ActiveX components can't create objects"
We know it may be because, erwin and Excel need to be either 32-bit or 64-bit, so how to use API using erwin DM 64-bit and Excel 32-bit? Is it possible to have both 32-bit and 64-bit versions of erwin DM on the same PC?
Solution:
The answer is Yes. erwin DM and Excel need to be either 32-bit or 64-bit to work together. If they are not, there is an incompatibility between erwin 64-bit and MS Excel 32-bit and it will not work. To overcome this, there are three options as follows:
- Check with your group if your Office (including Excel) can be upgraded to 64-bit?
- Uninstall erwin 64-bit and install 32-bit version.
- Use a 32-bit version of erwin without installing it.
This document is about the third option – how to have both, 32-bit and 64-bit of same versions of erwin DM on the same PC, to use with the 32-bit version of Excel.
Here is how to do it:
- Install 32-bit of the same version of erwin DM on a different PC. (You do not need a license as you will not be launching it.)
- Once installed, copy all files under erwin folder to a network drive to paste them in the other PC.
- On your PC, create a new folder right next to where your current erwin 64-bit is installed at. Name it something like 970_32_bit_bin (just a suggestion).
- In this new folder, copy and paste ALL folder and files into the newly created folder (as saved in step # 2). (The first folder may be BackupFiles.)
This will give you two folders - one where the 64-bit files are and the second where the newly pasted 32-bit erwin files reside. Both will have erwin.exe - so if you launch erwin from the folder with 64-bit, erwin will be launched as 64-bit, but if you use the other one, it will be launched as 32-bit. The models saved using either 32-bit or 64-bit can be opened from either erwin 32-bit or 64-bit. However, to use API, the needed files from the 32-bit folder need to be registered. The two needed DLLs are:
- EAL.DLL
- ERXML.DLL
Here is how to register them:
- In Windows Explorer, navigate to the newly created folder where erwin 32-bit resides - copy its path
- In Windows, right mouse and click on 'Search' and type in CMD.
- In the result set, right mouse click on the Command Prompt and 'Run As Administrator' it is important that CMD prompt is launched using 'Run As Administrator'
- In the DOS prompt type in REGSVR32 " and add the full path as copied in step a followed by \EAL.DLL". It should look as follows:
Please make sure that the path is correct. If you have the privileges to register the DLLs, you will see a notification that the command succeeded. In the Window above erwin 32-bit is at C:\Program Files\erwin\970_32_bit_bin folder. Change it to the correct path in your environment.
- Repeat the same step except replace the file name EAL.DLL with ERXML.DLL
- For both these you should see the message that the registration succeeded.
Once this is set you should be able to use erwin API using 32-bit folder and files.
Other articles on this:
Comments
0 comments
Please sign in to leave a comment.