1
Suggestions and Requests / Re: Two quality of life improvements
« on: November 19, 2013, 03:11:52 pm »
While this is a work around, I still feel that this should be native functionality.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EA;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
EA.Repository repo = new EA.Repository();
EA.Package package = null;
// PARAMETERS !!!UPDATE THESE!!!
String conn = "Enterprise_Architect --- DBType=1... etc"; //PUT WHOLE SQL STRING IN
String username = "user";
String password = "pass";
//Transfer DBMS to EAP
String eapfile = "C:\\Temp\\html\\model.eap";
String eaplog = "C:\\Temp\\html\\transfer_log.log";
repo.GetProjectInterface().ProjectTransfer(conn, eapfile, eaplog);
// Browse through structure
repo.OpenFile2(eapfile, username, password);
package = repo.GetPackageByGuid("{HARDCODED_GUI}"); //I PUT MY NODE GUI HERE TO GET WHOLE MODEL
// Generate HTML Documentation
String guid = "" + package.PackageGUID + "";
String tmppath = "C:\\Temp\\html";
String image = "PNG";
String template = "Feedback";
String ext = ".htm";
repo.GetProjectInterface().RunHTMLReport(guid, tmppath, image, template, ext);
// Close connection to database
repo.CloseFile();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EA;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
EA.Repository repo = new EA.Repository();
// PARAMETERS
String conn = "Enterprise_Architect --- ACCESS STRING";
String output_directory = "C:\\TEMP\\ea_temp\\";
String project_directory = "aamc_lwmotf\\";
String username = "username";
String password = "good pass";
//Transfer DBMS to EAP
repo.OpenFile2(conn, username, password);
String eapfile = output_directory + project_directory + "model.eap";
String eaplog = output_directory + project_directory + "transfer.log";
repo.GetProjectInterface().ProjectTransfer(conn, eapfile, eaplog);
repo.CloseFile();
}}}
The content of the report is defined as either:
· A list of packages (defined as attributes) dragged onto the element in whatever order or combination is most appropriate to your requirements; you can easily add or delete packages as necessary
or
· (Not for HTML reports) a standard model search (identified by Tagged Values) created within the Model Search facility; note that diagram searches are not supported - when you generate the document, this search captures the required data throughout the model and populates the document