Project 2002 Automation

Hello, When I tried to use the Project2002 Object Model from Navision, it would return an error when using the CREATE() function, saying that another instance had already been created. It ought not to say so as I had not previously CREATEd the object before, in fact, trying to use the Automation object variable without creating it first would throw an error indicating the latter. I have been forced to create a COM DLL (using VB6) that implements an object class that among other things returns a Project.Application object. Is there a better way to handle this situation? Thank you in advance, Gerardo Korndorffer

Try putting a CLEAR() just before the CREATE(). This is just to be safe, though. I have used Project Automation without any problems, so I fail to see the reason for your problem…

Also you could use the following code; IF ISCLEAR(Project2000App) THEN CREATE(Project2000App); Hope this helps.

Anyone knows about a good solution integrating MSProject and the jobs in Navision?

Unfortunately it still will refuse to work, maybe it has something to do with the Spanish version of either MS Project 2002 or Navision…suppose we’ll have to use that DLL I just created to workaround the problem, thanks anyway to all those who tried

How have you dealt with the problem about “PROJECTBEFOREASSIGNMEN is defined more than once”. According to Partnerguide then this problem will make it impossible to use Project Automation. What version of Navision are you using? What Automation (exactly) are you registrering?

quote:


Originally posted by Admin
How have you dealt with the problem about “PROJECTBEFOREASSIGNMEN is defined more than once”. According to Partnerguide then this problem will make it impossible to use Project Automation. What version of Navision are you using? What Automation (exactly) are you registrering?


We did try Navision Attain 3.60 and Navision Financials 2.60, and the component was ‘Microsoft Project 10.0 Object Library’.Application Both failed.[V] I had to create a VB6 DLL in order to workaround the problem, simply by creating a VB class that would have a property that returned a reference to a MS Proyect Application object. This solution would work but it would require installing the VB6 runtime, and registering the DLL file…[^] Anyway, after installing a few applications, that had nothing to do with neither Navision nor MS Project 2002, and using the windows update, it is working nicely [?] I no longer get an error message when using Project Automation. Thanks for everything [:)]

This Really sounds strange! I’m running MBS Navision 3.70 and MS Project 2002 - but I’m getting the described error again and again!

Well, last time I got the same error you got (only in Spanish, I did an innapropiate translation at the time of the original posting because the posting was done a long time after the error was detected), was yesterday, only I installed new software yesterday afternoon and everything is working fine right now…? I must admit it is strange enough, installing a program to control my new USB 2.0 mouse shouldn’t do the trick, and installing a critical security patch for Windows XP shouldn’t either, but it seems it did. Anyway, if you wish I can send you an example of the DLL, we call “wrapper” to bypass the problem. It should allow you to get around the problem. I think the problem lies on how some components (DLL, OCX, …) are registered

I would love if you could send me this wrapper, even if I find the way work around it, then it might come in handy. My email is: webmaster@mbsonline.org