Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: Rémi Roy on May 22, 2009, 01:37:17 am
-
I want generated html document using API
when i run this code on xp sp2 is work perfectly
m_Repository = new RepositoryClass();
m_Repository.OpenFile(ConfigurationManager.AppSettings["ConnectionString"]);
StringBuilder pageInitial = new StringBuilder();
foreach (EA.Package p in m_Repository.Models)
{
Directory.CreateDirectory(ConfigurationManager.AppSettings["OutputDirectory"] + "/Temp/" + p.Name);
m_Repository.GetProjectInterface().RunHTMLReport(p.PackageGUID, ConfigurationManager.AppSettings["OutputDirectory"] + "/Temp/" + p.Name, "png", "<default>", ".htm");
But when i'm running this code in windows 2003 64 bit SP2
After some time my application generated this error
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x800
10105 (RPC_E_SERVERFAULT))
at EA.ProjectClass.RunHTMLReport(String PackageGUID, String ExportPath, String ImageFormat, String Style, String Extension)
at EAHtmlExport.Program.CreateHtmlReport(String outputDirectory)
at EAHtmlExport.Program.Main(String[] args)
But when i'm used the same code with EA 7.1 on windows 2003 is work perfectly
Anyone have idea about this bug ?
Thanks :)
-
Do you have permission to create and populate a directory tree? The default permission sets granted by the two OS versions differ somewhat.
-
Yes i'm a administrator of the computer.
-
Hi there. Have you had any luck finding a solution.
We have the same error code from EA while trawling through our model to create a report. All we are doing is iterating through elements to get the data.
It works when run in debug and seems to work if we add enough delay while iterating through the elements using a list box to report the progress - the act of outputting strings to the form seems to make it work :o
Chris
EDIT: we found that using for loop instead of a foreach, then using the GetAt() method to get the object, it worked for us
-
Remi,
Can you confirm which build of EA 7.5 you have installed? There was a known issue regarding generation of diagram images (and consequently HTML generation) in build 844. If you have not done so already, update to EA 7.5 build 845 from our website and try running your code again.