1
Automation Interface, Add-Ins and Tools / Re: Control EA via command line
« on: January 25, 2018, 07:59:28 pm »
I figured out that i don´t like VBS so i decided to change to C#.
I got a quite simple solution to generate documents via c#.
Thanks for help!
I got a quite simple solution to generate documents via c#.
Code: [Select]
//References: http://www.sparxsystems.com/enterprise_architect_user_guide/12.0/automation_and_scripting/reference.html
namespace CSharp_GenerateDoc
{
class Program
{
static string File = Path to .eap-File;
static string GUID = GUID of required package; //GUID vom "Requirements" Package unter "Global"
static string Doc_Template = Name of Document_Template;
static string FileName = Name of generated File;
static void Main(string[] args)
{
EA.App EAClient = new EA.App();
EA.Repository EA_Repo = new EA.Repository();
EA.Project EA_Proj = new EA.Project();
EA_Repo.OpenFile(File);
EAClient.Visible = false;
EA_Proj.RunReport(GUID, Dok_Template, FileName);
EA_Repo.Exit();
}
}
}
Thanks for help!