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 - Aaron B

Pages: 1 ... 53 54 [55] 56 57 ... 61
Or you could try writing to EA's output window from your Add-In using Repository.WriteOutput().  For Example:

Code: [Select]
Repository.WriteOutput("System", "Hello World", 0)More methods are available for interacting with EA's output window on the EA.Repository object, including CreateOutputTab(), EnsureOutputVisible(), and ClearOutput().

Automation Interface, Add-Ins and Tools / Re: Return EA Types Information
« on: October 22, 2009, 09:14:16 am »
Try using Repository.GetReferenceList().  Each reference list simply contains a simple collection of strings.  For example:

Code: [Select]
Set References = GetReferenceList("Element")
For i = 0 To References.Count - 1
      s = s & References.GetAt(i) & ";"

See API documentation for GetReferenceList() on the Repository page.

A DiagramLink record is not automatically created after adding a Connector.  If no DiagramLink record exists in the database, the Connector will still be drawn on the diagram in EA using default values.  A DiagramLink record is typically not created by EA until the user makes a change to the location or appearance of the connector on the diagram.

If you wish to explicitly create a DiagramLink record for your new Connector, something like the following code should help accomplish this task.

Code: [Select]
Public Function CreateDiagramLink(ByRef conn As EA.Connector, ByRef diag As EA.Diagram, ByVal bIsHidden As Boolean) As EA.DiagramLink
    Dim newlink As EA.DiagramLink
    Set newlink = diag.DiagramLinks.AddNew("", "")
    newlink.ConnectorID = conn.ConnectorID
    newlink.IsHidden = bIsHidden
    Set CreateDiagramLink = newlink
End Function
With both DiagramObject and DiagramLink records, be careful that you do not add a duplicate record for the same object.  This can have undefined results when viewing through EA.

The page in the help file regarding deployment of Add-Ins has been updated in the latest build (846) to better describe how to register an Add-In built using .NET.

If compiled as a .NET DLL, such as C# or VB.NET, register the DLL using the RegAsm command from the command prompt; for example:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\MyCompany\EAAddin\EAAddin.dll" /codebase

Every Package object (with the exception of the root model node) has an associated Element object accessible through the Package.Element property.  You will need to assign the Tags to the TaggedValues collection on the Element object.


EA.TaggedValue tag = (EA.TaggedValue)package.Element.TaggedValues.AddNew("Id", "");
tag.Value = "1";

Automation Interface, Add-Ins and Tools / Re: MDG technology as exe
« on: July 14, 2009, 09:59:20 am »
The "exe" distributions you refer to are simply the installers.  After the installation process has completed, you will find that the MDG Technology itself will either be an xml file, or an Add-In DLL as KP mentioned.

You would need to investigate elsewhere how to bundle your MDG Technology into a windows executable installer.  We do not provide any utilities to handle this task.

To create an instance of a component - create a new "Component" Element and set the ClassifierID to the ElementID of the appropriate Component.


Code: [Select]
Set Component = [reference to original Component Element]
Set Package = Repository.GetPackageByID(Component.PackageID)
Set NewInstance = Package.Elements.AddNew("", "Component")
NewInstance.ClassifierID = Component.ElementID
Hope this helps.


See Package.FindObject(string).

The path passed to this function is relative to the package that you are calling from.  Can specify the path to a package, element, attribute or operation.

Unfortunately it is not possible to get/set Information Items Conveyed by an Information Flow connector from automation at this time.  I have logged this as a feature request on your behalf.  Sorry we could not be of more assistance.

Automation Interface, Add-Ins and Tools / Re: Attribute Alias
« on: June 09, 2009, 09:36:25 am »
The Alias for an Attribute is accessible through Attribute.Style in the automation interface.  See:

I am not familiar with how this is represented in XMI, so I cannot comment on that.

Hello Fred,

DiagramObjects.AddNew() returns type EA.DiagramObject, not EA.Element.

A DiagramObject is an instance of an Element on a Diagram.

EA.DiagramObject nelem = (EA.DiagramObject)(currdiag.DiagramObjects.AddNew("",""));
nelem.ElementID = currelem.ElementID;

You do not need to specify anything for the Name and Type parameters of DiagramObject.AddNew(), but you can use them to set position information if you like as shown in the following example:

You should be able to define a separator by simply using a hyphen.

E.g.  Array("Options", "-", "About...")

Should look like:


The following code can be used to add an existing element to a diagram:

Code: [Select]
Set obj = diagram.DiagramObjects.AddNew("", "")
obj.ElementID = element.ElementID


This is not in the documentation with the current release, but will be in the help for build 845.

Pages: 1 ... 53 54 [55] 56 57 ... 61