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 - eric.meredith

Pages: [1]
Nizam - thanks, I will try - haven't used the ParentID thingy before.
Rich - I am not using an "Excel Import" per se - I am using VBA (effectively VB) to programmatically create and manipulate objects. I just didn't know how to create a child of a Capability.

Thanks to both for your replies.

Appreciate any help I can get.

I have used the Excel Importer extensively to import Server Objects, Applications, and to create multi-level packages - so I'm familiar with the API interface.

I need to automate the insertion (later update) of Capabilities. Some of these will be decomposed into sub-Capabilities. From a UI perspective I can do everything I want/need, but with automation, I'm not even sure how to ask the right questions.

Yet, "Capabilities within Capabilities" leaves me blank. See this link for an example:

tldr; What API do I use to add a Capability within an existing Capability.


General Board / How to word-wrap Diagram Notes
« on: December 14, 2017, 01:25:51 am »
I can make a Diagram Note wider, but I need to make it narrower and have the contents word-wrap.

Is this possible?

General Board / Re: Opening project via SharePoint interface
« on: December 13, 2017, 01:30:42 am »
Was this ever solved?

General Board / Controlling Access to objects, packages, features
« on: December 07, 2017, 07:15:25 am »
How do I control who can access, edit, manage, etc various packages, objects, or features of SPARX?

General Board / Re: Non-visual associations
« on: October 19, 2017, 12:17:40 pm »
Perfect answer VKN. Thx  :)

General Board / Non-visual associations
« on: October 12, 2017, 06:29:36 am »
Self-identified newbie here.

I can draw a dependency between two objects and see their relationship in the Relationships window.

Is there a way to establish a relationship, without "drawing the lines", i.e. can I connect an Application to the Server it runs on, without placing either on a diagram and connecting them?


General Board / Setting defaults for Attribute Visibility
« on: October 12, 2017, 02:30:50 am »
I am finding myself right-clicking on each and every server node and manually setting the visible attributes to a specific one (IP Address) clikcing on "Custom" checkbox, then "Custom" button, and then deselecting the ones I don't want. After that I click the checkbox to display Notes.

Is there a way to make these choices the default? Or is there a way to do this en masse?


You were right - I breezed right over the classes in Excel.

My bad - I didn't ask the question well.

I have copied the files that I think are necessary, and when I launch Access and create a Module, I can see/load the Enterprise Architect Object Model 2.10. From there I can try to dimension an object as I would have done in Excel.

Dim EAConx as New EAConnector

BUT! In Access, 'EAConnector' is not available, I can only see 'EA' - see attached pic.

What am I missing?


I tried to port the Excel code over to Microsoft Access and immediately discovered that EAConnector is not a valid object. Is there a replacement?

That was it! I was not calling the .Update method. In my defense, everything else WAS updated without calling .Update - but ... My bad.


So .. I think I tried all of the suggestion here, and it still not working. Here is a longer snippet of code, but understand EVERYTHING ELSE IS WORKING (sorry about the caps, but you must understand..) that all other fields are updating correctly.

Geert, when I look at the addOrUpdateAttribute  function, the 4th parameter (Description) actually maps to 'Notes', not Initial Value - which is what I'm trying to set. Stated another way -- bring up the Attributes dialog box, and look at the six columns (Name, Type, Scope, Stereotype, Alias, Initial Value). How do I set "Initial Value"?

Thank you so much for the help.

Code: [Select]
    'Add attribute #1
    Dim currentAttribute As EA.Attribute
    attrType = ""
    If row.Count > CONST_ATTRIBUTE1 Then
        attrName = row.Item(CONST_ATTRIBUTE1)
        attrValue = row.Item(CONST_VALUE1)
        If Len(Trim(attrName)) > 0 And Len(Trim(attrValue)) > 0 Then
            stereotype = ""
            Set currentAttribute = eaConn.addOrUpdateAttribute(currentClass, attrName, stereotype, attrValue, attrType)
            currentAttribute.Default = attrValue
            eaConn.addOrUpdateAttributeTag currentAttribute, attrName, attrValue
        End If
    End If

I am a newbie to EA, but a "classic" in app dev.

This snippet should work, me thinks:
See this code snippet below:
Dim currentAttribute As EA.Attribute
Set currentAttribute = eaConn.addOrUpdateAttribute(currentClass, “IP_ADDRESS”, stereotype, description, attrType)
currentAttribute.Default = ""

Now – I’ve obviously left a lot out here, but MOST of this works exactly as you would expect, enabling me to import server definitions into our SPARX repo quite nicely. The last line, however, does not work – and yet it appears to be correct.

It “IS” correct syntactically. It is supposed to set the Initial Value of an Attribute, in this case an attribute called IP_ADDRESS. In fact, If I use this code to create a Node (a server) and to create the IP ADDRESS attribute, it does everything EXCEPT insert the IP number. If I manually insert the IP number in EA, and then use the code to retrieve the attribute, why shock of wonder the IP_ADDRESS is there and is correct.

Thought? Help!!

Pages: [1]