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.


Topics - Eamonn John Casey

Pages: 1 2 [3] 4
31
I got a problem where I create a Connector through the API and create the same Connector manually. The API Version shows the stereotype in the diagram. The manual one shows the text I want to show. I have create my own MDG.

The code looks like this:
Code: [Select]
public EA.Connector FindorCreateConnector(string fromElementGUID, string toElementGUID, string connectorType, string connectorDirection, string connectorStereoType)
{
    EA.Element fromElement = eaRepository.GetElementByGuid(fromElementGUID);
    EA.Element toElement = eaRepository.GetElementByGuid(toElementGUID);
    EA.Connector connectorFound = null;

    foreach (EA.Connector connector in fromElement.Connectors)
    {
        if (connector.SupplierID == toElement.ElementID)
        {
            connectorFound = connector;
        }
    }
    if (null == connectorFound)
    {
    connectorFound = (EA.Connector)fromElement.Connectors.AddNew("", "Connector");
        connectorFound.Type = connectorType;
        connectorFound.Stereotype = connectorStereoType;
        connectorFound.SupplierID = toElement.ElementID;
        connectorFound.Direction = connectorDirection;
        connectorFound.Update();
    }
    return connectorFound;
}

Calling it like this:
Code: [Select]
FindorCreateConnector(fromGUID, toGUID, "association", "", "NAV_Begrep::relatertTil");
Any ideas what is missing?

32
Hi!
I am importing stuff into EA and I am putting the primary key from the Source system into the TaggedValues Collection. Has anyone implemented a way to find the element again using the TaggedValues? Maybe some sort of SQL Query or something.
Any help would be appreaciated,
Eamonn J.

33
General Board / LemonTree: Anyone got any experience to share?
« on: December 07, 2016, 03:10:51 am »
Hi!

We got Enterprise Architect 12.1 and will now upgrade to v13. Time based modelling is very interesting but there is critisim in the group that it has the potential to create alot of clone versions inside the repository.
Does anyone have any experience how LemonTree works?
I have used SubVersion and TFS and Diff'ing, branching and merging versions. Does LemonTree do the same for EA elements?
I am thinking that you check in/out of LemonTree al.a.  SubVersion and then deploy the finished version (and only one) to the EA Repository.

Any advice or help greatly appreaciated.
Eamonn J.

34
General Board / Model View and SQL capabilities
« on: December 02, 2016, 02:49:05 am »
Hi,
I am trying to make a Model View and I don't know how to put the current package id (the package the diagram is in) into the SQL. Has anyone done this before?

Appreaciate any tips.

Eamonn J.

35
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;
            break;
        }
    }

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

36
Automation Interface, Add-Ins and Tools / Problem with MDG Toolbox
« on: November 14, 2016, 07:58:57 pm »
Hi,
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.

37
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.

38
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"
   
   Session.Output("Starting.")
   
   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  & "'")
   next
   
   dim applicationPackage as EA.Package
   applicationPackage = GetPackageByName(applicationsPackage, newApplicationName)
   
   if applicationPackage = Nothing then
      Session.Output("    Adding new application : '" & newApplicationName & "'")
   else
      Session.Output("    Updating existing application : '" & newApplicationName  & "'")
   end if

   Session.Output("Done.")
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

main

39
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?

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

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

41
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.

42
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.

43
General Board / Multi-Repository Environment
« on: September 20, 2016, 11:15:11 pm »
Hi!
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?

Thanks,
Eamonn J.

44
Hi,

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)
{
diagramObject.top = top;
diagramObject.left = left;
diagramObject.bottom = bottom;
diagramObject.right = right;
diagramObject.Update();
}

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;

diagramObject.Update();
}

I also do the Diagram.Update()

Any ideas?

Thanks,
Eamonn J.

45
General Board / DDL change scripts
« on: September 06, 2016, 08:53:33 pm »
Hi,
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.

Thanks,
Eamonn J.

Pages: 1 2 [3] 4