How to automate the generation of HTML output in Enterprise Architect

前端 未结 2 1662
悲&欢浪女
悲&欢浪女 2021-02-03 12:14

Enterprise Architect has a way to generate the documentation in HTML/RTF/etc. that you could publish, but you have to use its GUI to do that manually. When you have your *.eap f

相关标签:
2条回答
  • 2021-02-03 12:52

    I'm afraid you will need to write some code, but it shouldn't be more than a dozen lines or so. The function you will want to call is Project.RunHTMLReport() - a quick search for "RunHTMLReport" in the EA help file will tell you what parameters it needs, and a search on the Sparx website forum will find you an example or two.

    0 讨论(0)
  • 2021-02-03 12:57

    Thanks chimp, It was easier than I thought. In Java:

    class EADump
    {
        public static void main(String[] args)
        {
         org.sparx.Repository r = new org.sparx.Repository();
    
         System.out.println("Repository: " + args[0]);
         System.out.println("Package:    " + args[1]);
         System.out.println("Output:     " + args[2]);
         r.OpenFile(args[0]);
         r.GetProjectInterface().RunHTMLReport(args[1], args[2], "GIF", "<default>", ".html");
         r.CloseFile();
        }
    }
    
    0 讨论(0)
提交回复
热议问题