Show Posts

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.

Messages - Eamonn John Casey

Pages: 1 ... 4 5 [6] 7
Automation Interface, Add-Ins and Tools / EA 13 and Elements.AddNew
« on: November 26, 2016, 01:46:25 am »
I am having trouble with preventing adding duplicate elements in EA 13 Desktop Edition. The code below does not find the element (foreach). Also for some strange reason the SQLQuery does not return values. But in EA the same SQL returns values.

Any ideas? Is there something that I need to do on the repository til ensure updates are written?

Code: [Select]
internal Element FindOrCreateElement(Package rootPackage, string elementName, string stereoType)
    Element returnElement = null;

    foreach (Element element in rootPackage.Elements)
        if (0 == element.Name.ToLower().CompareTo(elementName.ToLower())
            && 0 == element.Stereotype.ToLower().CompareTo(stereoType.ToLower()))
            returnElement = element;

    if (null == returnElement)
        returnElement = rootPackage.Elements.AddNew(elementName, stereoType);
    return returnElement;

Automation Interface, Add-Ins and Tools / Problem with MDG Toolbox
« on: November 14, 2016, 07:58:57 pm »
Hopefully someone can help me out here.
I have an MDG that was working just fine. I added another toolbox and added New elements to the metamodell.

On each profile I select Advanced -> Save as Profile (all toolboxes and the metamodell).
Then Tools -> Generate MDG.

I have elements in the toolboxes that are Generalisations (of Archimate2::) and Extensions (of UML::). The New toolbox Works fine. My Extensions in the old toolbox don't. The elements show in the toolbox like UML elements and EA will not allow me to model With them. Have I missed a step? Or is there somehing that has gone missing that I need to put back?

Any tips/advice to troubleshoot this problem would be helpful.

Eamonn J.

General Board / EA 12.1 - Install Learning Center manually
« on: November 11, 2016, 09:20:14 pm »
I just downloaded the Learning Center and would like to install it. There doesn't seem to be any way to do this. Can't find "Manage Libraries" in EA 12.1.

I have written this code. And on line 38 it says "Object value not set". Can anyone see what I have done wrong? What I am trying to do is find a Package in the repository and add subpackages and elements. Anyone want to share a script for that?

sub main
'on error resume next
    dim applicationsPackage as EA.Package
   dim repositoryRoot as EA.Package
   dim i
   dim currentModel as EA.Package
   dim newApplicationName
   dim newApplicationsPackage as EA.Package
   Repository.EnsureOutputVisible "Script"
   newApplicationName = InputBox("Application Name:")   
   set repositoryRoot = Repository.Models.GetByName("NAV_Virksomhetsarkitektur")
   set applicationsPackage = Repository.GetPackageByGuid("{4AF22AE4-A589-4ba3-9BD6-1BA7B1E99D55}")
   for i = 0 to applicationsPackage.Packages.Count - 1
      set newApplicationsPackage = applicationsPackage.Packages.GetAt( i )
      Session.Output(i & " '" & newApplicationsPackage.Name  & "'")
   dim applicationPackage as EA.Package
   applicationPackage = GetPackageByName(applicationsPackage, newApplicationName)
   if applicationPackage = Nothing then
      Session.Output("    Adding new application : '" & newApplicationName & "'")
      Session.Output("    Updating existing application : '" & newApplicationName  & "'")
   end if

end sub

function GetPackageByName(packagesToSearch, packageName)
   on error resume next
   dim package as EA.Package = Nothing
   set package = packagesToSearch.GetByName(packageName)
   GetPackageByName = package
end function


General Board / Which Edition?
« on: November 10, 2016, 08:01:15 pm »
I am looking to purchase Enterprise Architect for personal useage. All I need to do is fool around with ArchiMate and scripting from the inside and using the API from the outside.
Do you think that this is covered by the basic Desktop Edition?

General Board / Enterprise Architect v13 upgrade guide
« on: November 01, 2016, 10:49:16 pm »

Is there any information / Product documentation on how to Upgrade from v12.1 to v13? Is it just a matter of running the Client installer? Is there changes to the database or the Cloud Server?

Thanks in advance,
Eamonn J. Casey

General Board / Database Engineering
« on: October 05, 2016, 07:25:27 pm »
Hi! I have a few questions about database engineering (Database Builder) in EA.

1. Is it possible to generate DDL without having a active database connection? How?

2. Can I import DDL into the Database Builder package?

3. I am having problems creating views. Is there anyone that has blogged or written any instructions on how to do this? I am thinking drag-and-drop database classes from the repository and link them together graphically. Is that possible.

Eamonn J.

Suggestions and Requests / Relationships and Traceability
« on: September 29, 2016, 10:47:03 pm »
Why is there no way to find out who created a relationship between two elements? There is now CREATEDBY and no TIMESTAMP?

Elements have ownership so it is nice to be able to go talk with them about what that element really  means. Relationships are anonyoumus so you don't know why that was created and you don't know the effect of removing it.

In a large scale distributed team working on ca 350 applications you can count on that they will make unforseen choices about relationships. How can we find who created the connector?

FEATURE REQUEST: Add author and date to relationships.

General Board / Re: V 13 Schedule
« on: September 23, 2016, 06:34:43 pm »

Had a chat With an insider. I am expecting that we will see the final release during NeXT month - august.

Eamonn J.

General Board / Multi-Repository Environment
« on: September 20, 2016, 11:15:11 pm »
I was wondering if anyone has come across a site that has multiple Repossitories? We are a large organisation With approximatly 17 EA shared Repositories.
The reason for this is to fin tune Security to stop users in one business unit from having too much knowledge about the inner workerings of systems in another.
We are using a mixture of ToGAF and ArchiMate to structure the content. Centerally we got a main Repository thta contains elements and models of interest to the entire organisation. Local business units get to decide Access to their own Repositories themselves.

Is there anyone that has some advice on how to make sharing and collaboration easier without affecting local Security?

Eamonn J.


I used Attempt 1 and negated the top and bottom values and now it Works as expected.



I got a problem when updating the size and position of DiagramObject using the API.
I have a Boundary object and that code works just fine. But then I try placing (for example an ArchiMate element). The same code will not move the element properly.

Attempt 1:
Code: [Select]
private void UpdateElementOnDiagram(
EAAPI.Diagram diagram, EAAPI.DiagramObject diagramObject,
int left, int right, int top, int bottom)
{ = top;
diagramObject.left = left;
diagramObject.bottom = bottom;
diagramObject.right = right;

Attempt 2:
Code: [Select]
private void UpdateElementOnDiagram(
EAAPI.Diagram diagram, EAAPI.DiagramObject diagramObject,
int left, int right, int top, int bottom)
String styleString = diagramObject.Style.ToString();
String[] styleList = styleString.Split(';');

for (int nIndex = 0; nIndex < styleList.Count(); nIndex++) {
if (true == styleList[nIndex].Contains("l=")) {
styleList[nIndex] = String.Format("l={0}", left);
} else if (true == styleList[nIndex].Contains("r=")) {
styleList[nIndex] = String.Format("r={0}", right);
} else if (true == styleList[nIndex].Contains("t=")) {
styleList[nIndex] = String.Format("t={0}", top);
} else if (true == styleList[nIndex].Contains("b=")) {
styleList[nIndex] = String.Format("b={0}", left);
styleString = String.Join(";", styleList);
diagramObject.Style = styleString;


I also do the Diagram.Update()

Any ideas?

Eamonn J.

General Board / DDL change scripts
« on: September 06, 2016, 08:53:33 pm »
I reverse engineered a database into a UML Class diagram. Is there any good description about how I can generate DDL change scripts when I just add or remove columns? I tried using Database Builder but the description in the documentation is not very clear. I can't get it to recognise column changes.
Anyone have or know of a better description.

Eamonn J.


The A3 MDG is enabled and works just fine. In my MDG I have extended some A3 elements and they work fine. In my Toolbox before I changed the Archimate3::ArchiMate attributes to Archimate3::ArchiMate, they worked fine.
After I changed the attribute names to A3, the elements still appear in the toolbox. But they do not have an ArchiMate icon and cannot be dragged out to the modelling area.

I have modified MDGs before, but never to upgrade the underlying metamodel. So I am probably missing a step or setting.

Eamonn J.

The "Migrate" macro in the ArchiMate3 MDG just updates the diagrams. I have changed Our MDG metamodel to use Archimate3. But obviously I have missed something along the way.
All of my Extensions work just fine. It is the Archimate3 elements in my toolbox that doesn't work. Maybe I have to import the Archimate3 namespace into the MDG somhow.
Eamonn J.
Eamonn J.

Pages: 1 ... 4 5 [6] 7