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 - andersd7

Pages: [1] 2
1
Seems that there is not much demand for C4 modelling in EA..

Nevertheless.. I had a bit of fun building VBscripts to exchange C4 models in and out of EA using PlantUML.

Managing layout was a challenge.. but I am reasonably happy with how it works.

Funny what you get used to.. The scripts helps you build a diagram very quickly without all the clicking..

See https://modelhelper.home.blog/2022/11/28/how-to-simplify-c4-modelling-in-ea/ for the writeup..

2
agree Geert.. you need a filename to save the file.

sorry I must of misunderstood the original question.

I want to adapt it to select a file or folder to save to.

3
Hello,
I am in the process of writing an EA script to allow you to create C4 models via PlantUML script.. very similar to https://modelhelper.home.blog/2019/03/10/create-a-sequence-diagram-using-plantuml/

is anybody using the free C4 MDG profile provided by LieberLieber? 
https://www.sparxsystems.eu/c4

Interested in your thoughts..

thanks,
David.

4
The following routine exports the contents of a note and saves it to a file.. in this case it is specific for PlantUML PUML files.. but it does prompt you for a folder.

https://github.com/gobravedave/Enterprise-Architect/blob/master/Diagram%20Scripts/Export-PlantUML-Script.vbs

5
General Board / Re: Import of PlantUML Sequence Diagrams
« on: March 10, 2019, 11:42:21 pm »
I would be happy to collaborate if anyone else had such a requirement?
Not sure if this is still an issue for you ADucci.. however I have developed a VBScript to Create a Sequence Diagram using PlantUML.

See my blog post on the topic which includes source code.

6
I will upload the scripts to Git and provide a write up on my blog..

I have created a blog post which describes the functionality of the VBScript I have written to  Create a Sequence Diagram using PlantUML

The post incldues my GitHub details, instructions to install and the feature backlog I hope to get though during my downtime.


7
  I am using text produced by websequencediagrams.com as my input.

Anton,
looks simpler than what PlantUML has to offer..

I had to make a few edits to render in webseqeuncediagrams.. but this should parse into EA using my vbsrcipt..

https://www.websequencediagrams.com/#open=477934
PlantUML comparison

thanks,
David.

8
Have a look at this script:

https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Projects/Project%20A/Element%20Group/MessageOverview.vbs

It creates a sequence diagram with a bunch of messages in fragments.

I don't remember the exact details, but I know I had to figure these things out to get it working.

Geert

I had a look and the example provided and tried a few different things.. however I still have not been able to manipulate the coordinates of the sequence flows..

I therefore reverted to trying to manipulate the  Fragments and partitions..



I could add some code similiar to Geert to manipulate the sizes of the nested fragments.. but there is not much real estate to play with.

below is the expected result which I had fixed up manually and low behold the x/y coordinates are updated..



I will upload the scripts to Git and provide a write up on my blog..

9
Hey anders, how are you viewing the connector and element lists (the ones in your images), looks like a good debug tool.

simply dropped a ModelView element from the Dashboard toolbox onto the diagram and supplied a custom sql as the chart source..

11
I have written a VBScript which takes in a PlantUML script and creates a Sequence diagram but I am having difficultly in the positioning of the sequence flows..

I have been trying the manipulate the startx/y and endx/y values on the connector to position the flow accordingly as there does not appear to be a way to assign/associate a sequence flow to an IntegrationFragment (ie Alt, Loop) and or a partition..

Before:


I run a script to do the following:
  • update the SequenceNo on  connector(891) from 1to 2 and set the startpointy/endpointy values to -250 with the aim of moving it inside the loop fragment (ie between -175 and -291)
  • add a connector with SequenceNo set to 1 and the y=-130
  • add a connector with SequenceNo set to 3 and the y=-400, with the aim to position the flow below the loop fragment

the script appear to work..
Code: [Select]
2019-3-6 18:33:47 [INFO]: ------VBScript Test Import------
2019-3-6 18:33:47 [DEBUG]: updates connector (891) trigger sequenceNo: 2 startpoint x: 100 startpoint y: -250 endpoint x: 205 endpoint y: -250
2019-3-6 18:33:48 [DEBUG]: created connector (902) before trigger sequenceNo: 1 startpoint x: 100 startpoint y: -130 endpoint x: 205 endpoint y: -130
2019-3-6 18:33:48 [DEBUG]: created connector (903) after trigger sequenceNo: 3 startpoint x: 100 startpoint y: -400 endpoint x: 205 endpoint y: -400
2019-3-6 18:33:48 [INFO]: Script Complete
2019-3-6 18:33:48 [INFO]: ===============

However it appears that EA renders the flows using SeqeunceNo and default spacings.. rather than the provided x/y coordinates..

After


I am looking for some clues on how the sequence diagram is rendered.. like is there something in pdata5 I need to parse out for..


12
I am doing something similar using VBScript to build a sequence diagram using PlantUML script as input.

Essentially the steps are:
  • create an Element of type InteractionFragment..
  • within the element add Partition for each condition
  • create a DiagramObject.. with the coordinates..

Excerpt of code (not complete)

Code: [Select]
set element = elements.AddNew( fragmentName, "InteractionFragment" )
element.Subtype = fragment_type(mid(script,1, i-1))
.....
dim partitions as EA.Collection
dim partition as EA._Partition

set partitions = element.Partitions
set partition = partitions.AddNew(partitionName,"Partition")    'where partition name is the condition
partition.Size=40 'default size
element.Update
.....

diagramObjectName= "l=" & layout_array (i,6) & ";r=" & layout_array (i,7) & ";t=" & layout_array (i,4) & ";b=" & layout_array (i,3)
set diagramObject = currentDiagram.DiagramObjects.AddNew(diagramObjectName, layout_array (i,1))
diagramObject.top = layout_array (i,4)
diagramObject.bottom = layout_array (i,5)
diagramObject.left = layout_array (i,6)
diagramObject.right = layout_array (i,7)
diagramObject.ElementID = layout_array (i,2)

.....
function fragment_type(script)

select case script
case "alt" fragment_type = 0
case "opt" fragment_type = 1
case "break" fragment_type = 2
case "par" fragment_type = 3
case "loop" fragment_type = 4
case "critical" fragment_type = 5
case else fragment_type = 0
end select
end function

However I am struggling with lining up sequences to fit nicely with an IntegrationFragment/Partition.  I will post  seaprately on this..


13
I have a similar requirement where I want to show vaues for all diagramobjects/diagramlinks for a given diagram within a modelview Dashboard object as per the following Custom SQL.

Code: [Select]
select conn.ea_guid AS CLASSGUID, conn.Connector_Type AS CLASSTYPE, dl.ConnectorID as [ID], conn.Name as [Name], src.Name as [Source], trg.Name as [Target], conn.PtStartX, conn.PtEndX, conn.PtStartY, conn.PtEndY, dl.Geometry
from t_diagramlinks dl, t_diagram d, t_connector conn, t_object src, t_object trg
where d.Diagram_ID = dl.DiagramID
and conn.Connector_ID = dl.ConnectorID
and src.Object_ID = conn.Start_Object_ID
and trg.Object_ID = conn.End_Object_ID
and d.Diagram_ID = #CurrentDiagramID#


has there been any further consideration to this request?


14
Suggestions and Requests / Searching the HTML published models
« on: March 30, 2008, 10:30:16 pm »
It would be great if the HTML output had the capability to allow a user to search for specific string or object..
please consider..
thanks,
David.

15
Suggestions and Requests / TOGAF Extension Improvements
« on: July 10, 2008, 11:33:59 am »
Using UML to describe Enterprise Architectures is not easy.  I was hoping the TOGAF extension would help provide guidance on being able to simplify this task.  Your product does provide a head start, however I believe the following suggestions should be considered in a future release.
  • TOGAF elements should be included in a UML Profile so that the elements can be extended if required
  • Extend the number/variety of reference or example models to help link TOGAF concepts and how they have been applied in UML.  eg the Enterprise Continuum
  • Provide a model of how each of the TOGAF elements relate to one another.  I get the impression when I look at the different diagram types and the associated toolbox, there has been no attempt to provide linkage.  eg I was modelling an application which is used by the business and wasn't sure if it was solutions building block, an architecture building block, an asset, a system, base line architecture, target architecture.  It could well be any number of these depending upon the view point, but to achieve this I would need to treat them as separate elements.

Pages: [1] 2