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 - Geert Bellekens

Pages: 1 2 3 [4] 5 6 ... 566
Automation Interface, Add-Ins and Tools / Re: Create MDG via script?
« on: October 10, 2018, 01:47:55 am »
What's even better with assembling the MDG from XMLs yourself is that you can look into the latter and detect whether they contain what they should (so is it a profile, for toolboxes, patterns, etc.). EA does not do that but blindly copies the files you pointed it to. I can't count how often I saved a profile at the wrong place (since EA does not remember the preferred place to save) which led to a just not working MDG ("go, figure" EA lets me stand in the rain) - well, until I did the assembly myself.

Version 14.1 now remembers where you last save the package/diagram as a profile thus avoiding these common mistakes.
You see sometimes they listen to us  :)


General Board / Re: Status property of diagrams
« on: October 09, 2018, 08:38:08 pm »
Hi Jörg,

No, the Use Case is the entity that is relevant, and that use case can be shown on different diagrams.
The use case should have a status, not the diagram.

Even more so with activity diagrams. An Activity diagram should only exist nested under an Activity. It is the Activity (and it's status) that is relevant in your model, not the diagram.


General Board / Re: Status property of diagrams
« on: October 09, 2018, 07:42:57 pm »

You are maybe trying too much to depend on diagrams.
Diagrams are basically a view on your model, but they should not really be part of it.

So for things like statuses etc.. you should look for (or create) an element that represent the contents of your diagram and assign a status (and other properties) to that element.

Status colors are shown as a shadow on elements (more clearly on requirements) that are shown on diagram.
They don't color the diagram itself.


Automation Interface, Add-Ins and Tools / Re: Create MDG via script?
« on: October 09, 2018, 07:38:40 pm »
I don't think there is any support for it in the API, but it it is not rocket science either.
If you wanted to do it yourself you would basically need to put the different sources into a big XML file.


General Board / Re: Status property of diagrams
« on: October 09, 2018, 05:20:15 pm »
Because no fields have been added to the db schema since at least 2004. (Version 4.0 of EA was the last one that required a database upgrade. Even then I don't think that upgrade was significant.)
To be fair, that hasn't stopped you from adding all kinds of fields and information to the model before. Think key-value pair columns like StyleEx, xml strings in columns, t_xref...
So I'm sure if you really wanted to you could add a status field to diagrams without changing the database structure.


General Board / Re: Automatically create aggregation relationships?
« on: October 08, 2018, 09:43:34 pm »
I was just writing a script to just exactly that  :o

Code: [Select]
function linkToParent(prElement, processDictionary)
'get the ref
dim parentRef
parentRef = ""
'trim off the last .xx
dim dotLoc
dotLoc = InStrRev (prElement.Alias,".")
if dotLoc > 1 then
parentRef = left(prElement.Alias, dotLoc -1)
end if
if len(parentRef) > 0 then
'get the parent
dim parentProcess as EA.Element
set parentProcess = nothing
if processDictionary.Exists(parentRef) then
set parentProcess = processDictionary(parentRef)
end if
if not parentProcess is nothing then
'check if not already present
dim existingCompositions
dim sqlGetExistingCompositions
sqlGetExistingCompositions = "select c.Connector_ID from t_connector c     " & _
" where c.Stereotype = 'ArchiMate_Composition' " & _
" and c.End_Object_ID = " & parentProcess.ElementID &  _
" and c.Start_Object_ID = " & prElement.ElementID
set existingCompositions = getConnectorsFromQuery(sqlGetExistingCompositions)
if existingCompositions.Count = 0 then
'create Archimate composition to parent
dim composition as EA.Connector
set composition = prElement.Connectors.AddNew("","Archimate2::ArchiMate_Composition")
composition.SupplierID = parentProcess.ElementID
composition.SupplierEnd.Aggregation = 2 'Composite
'set direction
composition.Direction = "Source -> Destination"
composition.ClientEnd.Navigable = "Unspecified"
composition.SupplierEnd.Navigable = "Navigable"
end if
'report error
Repository.WriteOutput outPutName,now() & " Could not find parent process with reference: " & parentRef, prElement.ElementID
end if
end if
end function
Weird thing is that you have to model it with the part as source and the whole as target.
And there is something fishy going on with the direction as well. If I don't specify anything i get an arrow pointing to the part, and Direction "Destination -> Source" ???
The code above does the same thing compared to adding one manually.



•   UCExtend (Extend)
•   UCInclude (Include)

Isn't that what you are looking for?


From a diagram yes, but not from a package anymore.


Do the attributes have a specific stereotype?

Can you post the code that creates the attributes?


General Board / Re: Scripting: Addnew Type List
« on: October 05, 2018, 07:07:00 pm »
Alternative is to open the SysML1.4 MDG file (found in Installation Folder\MDGTechnologies)

That is a readable xml file that lists all stereotypes in that technology.


General Board / Re: What is best-way to model System2System integration
« on: October 05, 2018, 03:56:57 pm »
I agree with the method Glassboy indicates as well, but I think the notation can be both ArchiMate or UML, it doesn't really matter. As long as you have a clearly defined metamodel + guidelines that documents the notation, the purpose and how it should be used.

It should also be clear that anything that isn't in the metamodel is not allowed.


The idea is that you first transform your model into a physical XML Schema model.

In that transformation you would typically add things like suffixes to your class name.
You can either modify the existing XSD transformation template, or you could write a script to do the transformation for you.

If all that is needed is a suffix then I guess editing the transformation template should suffice.


It's a bug.
It only works in the unified edition or higher.
Should be fixed in the next version.


So you really want two different stereotypes with the same name?

In that case, I don't think that is possible (nor a good idea)


Automation Interface, Add-Ins and Tools / Re: Saving/backup vbscripts
« on: October 04, 2018, 09:03:33 pm »
I wrote a script to do that.

This way I can manage my scripts in a version control system.


Pages: 1 2 3 [4] 5 6 ... 566