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 - Rich Anderson

Pages: 1 [2] 3 4 5
16
Hi there,

I'm wondering whether anyone knows of an MDG that has been developed for the Essence Language.    (http://semat.org/essence-1.1).

It has similar purpose but distinct differences from SPEM 2.0 (https://www.omg.org/spec/SPEM/2.0/) which does have an MDG.    I have a client that may be interested in this, so just checking to see if anyone here can point me in a good direction.

17
I would recommend that you try creating a simple VB.Net program using Visual Studio Community Edition that reads the spreadsheet directly through the Excel API and then updates the EA model directly using the EA API.  In this way, you can bypass the whole problem of Excel importing.  You can just write a loop that goes down the rows and/or columns of the spreadsheet and plugs the elements and connectors into EA.  I do this all the time and have done some quite complex importing that way.

18
Thanks for letting me know about that.  I had checked it out before, but what I need is something that I have more control over.   So it looks like there is no way to access the images as a BLOB using the API, right?  If I want that, then it appears that I will have to use a table query using the Jet API.   Right?

19
Hi There,    I would like to be able to generate a PowerPoint presentation from EA using VB.net.  However, I don't see any easy way to get a reference to the diagram image as an object through the API.  Anyone know how to do this or do I need to access the image through SQL?

20
Actually "Archimate2" with the lower case M does work.  That's what got me so confused.  I never tried "ArchiMate2".  My guess is that it won't work because the case sensitivity, but stranger things have happened!

21
Well, KP, that was it!  I re-ran with this change and it worked as before.  However, it's a bit odd that "Archimate2:Business" works, but "Archimate3:Business" does not.  It seems that the Archimate 2 MDG is either not case sensitive or uses lower case but the Archimate 3 MDG behaves differently!   

22
Querty, you are correct.  I re-ran the code to generate using Archimate 2 and it worked as expected.  It must be something wrong with the Archimate 3 MDG, I think.   I will log it as a bug.   

Thanks.

23
Hi There, 

I have a case where I'm programatically generating several diagrams and I'm not able to properly set the diagram type on creation with this code:

Code: [Select]
Dim archimatediagram As EA.Diagram
archimatediagram = parentelement.Diagrams.AddNew(parentelement.Name, "Archimate3::Business")
archimatediagram.Update()

I've read in other posts that it's not possible to change the diagram type programatically using the Metatype property because that was deemed to be unsafe, and there appear to be ways to do this in SQL (which I prefer to avoid). 

It seems however, reasonable that I should be able to set the type of diagram based on the MDG at creation and the AddNew method takes type as a parameter.  However, this code above always yields a basic class diagram. 

What, if anything, am I missing here?


24
General Board / Re: Learning the document generator
« on: March 27, 2018, 12:46:26 pm »
Thanks!  I will check into these!

25
General Board / Learning the document generator
« on: March 24, 2018, 11:41:30 am »
I'm trying to learn how the document generator works, mostly by reading the help system and just trying things.  I'm finding it to be a bit of "black art" and I find myself sometimes going in circles.  For example, I cant' seem to figure out how to generate the element details on a diagram directly after the diagram.  The documentation sort of explains it, but I can't get it to work.  I'm making some progress, but it's painfully slow.  Does anyone know a better way to learn this thing?   Some kind of tutorial with exercises would be good.

26
Thanks, Geert!   This code worked...

Code: [Select]
        Dim thisPackage As Package
        thisPackage = earepository.GetPackageByGuid("{22926A63-B111-45cf-94D4-49081E77E6A6}")
        Dim thisPos As Integer = 3
        ReportLine("Sorting...")
        For Each el As Element In thisPackage.Elements
            el.TreePos = thisPos
            ReportLine(el.Name & " " & thisPos)
            el.Update()
            thisPos = thisPos - 1
        Next
        earepository.RefreshModelView(thisPackage.PackageID)

It sort of makes the UI jump around, but it does resort the list.   

27
Thanks for responding so fast.   I had tried a number of combinations of updating the package and refreshing the collection of elements (there is no command to update the collection).   None of these had any effect.  I did try you last suggestion to sort these after inserting, and this code...

Code: [Select]

CODE
        Dim thisPos As Integer = 3
        ReportLine("Sorting...")
        For Each el As Element In thisPackage.Elements
            el.TreePos = thisPos
            ReportLine(el.Name & " " & thisPos)
            el.Update()
            thisPos = thisPos - 1
        Next

        ReportLine("Listing...")
        For Each el As Element In thisPackage.Elements
            ReportLine(el.Name & " " & thisPos)
        Next

CONSOLE

TESTING  AT 4:43:06 PM
Sorting...
Charlie 3
Baker 2
Adams 1
Listing...
Charlie 0
Baker 0
Adams 0

TESTING  AT 4:43:08 PM
Sorting...
Adams 3
Baker 2
Charlie 1
Listing...
Adams 0
Baker 0
Charlie 0


... shows the simple 3 member list reversing order when I "ReportLine" to my console, but not in the EA folder. It still stays in the original order if I exit EA an re-start.  I also cannot find the setting in the browser to turn alpha sorting off and on.  But it appears to be off because I am able to manually sort.    Any more ideas?


28
Hi There, 

I'm trying to add elements into a package in a particular order, but not having much luck. I understand the TreePos property needs to be set, but it does not appear to be having the effect.  If this code below worked as I wanted it to, it would add 3 classes to a package with the order "Charlie, Baker, Adams".  Instead it comes up "Adams, Baker Charlie" in  EA.  I can re-sort them manually, but I want this to be automatic.   

Code: [Select]
Dim thisPackage As Package
thisPackage = earepository.GetPackageByGuid("{22926A63-B111-45cf-94D4-49081E77E6A6}")

Dim newElement As Element

newElement = thisPackage.Elements.AddNew("Charlie", "Class")
newElement.TreePos = 1
newElement.Update()

newElement = thisPackage.Elements.AddNew("Baker", "Class")
newElement.TreePos = 2
newElement.Update()

newElement = thisPackage.Elements.AddNew("Adams", "Class")
newElement.TreePos = 3
newElement.Update()

I've tried various refresh and update commands on the package and the connectors, but to no avail. I've also tried multiple values for TreePos.   I feel like I must be missing something basic, so can anyone shed light on this for me?


29
General Board / Re: UI Suggestion - Option to Locate on Current Diagram
« on: December 13, 2017, 03:40:06 pm »
Then I have to go through several clicks to locate it.
No need. Just do CTRL+U while the element is selected in the project browser.

Thanks for the suggestion, but in my case, I'm trying to drag elements in from a search result.  In that case, I have to first locate the element in the project browser, make sure the large diagram has focus, and then select "Locate in Diagram".   It would be easier to just do it from the modal window, whether or not it is a separate button or a checkbox as suggested elsewhere in this thread (I'm pretty relaxed about that part).   

30
General Board / UI Suggestion - Option to Locate on Current Diagram
« on: December 13, 2017, 08:06:45 am »
I think it would be really good to have this checkbox inserted on this dialog.  Sometimes, my diagrams get quite big and I forget that I have already placed an element there.  Then I have to go through several clicks to locate it.   Why not just do this?




Pages: 1 [2] 3 4 5