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 ... 3 4 [5] 6 7 ... 525
Automation Interface, Add-Ins and Tools / Re: Repository.Models.Refresh()
« on: January 12, 2018, 10:55:42 pm »
you have to pass the package ID. Use "0" for whole model.


Automation Interface, Add-Ins and Tools / Re: Repository.Models.Refresh()
« on: January 12, 2018, 09:28:03 pm »
Could it be that you have mixed up Repository.Models.Refresh() with Repository.RefreshModelView()

I think the latter is the one you need to reflect changes in the order of packages in the project browser.


Changes done in the GUI will be saved to the database immediately upon pressing OK on the dialog.

When using the API object this effectively gets the object from the database and then you are (mostly) working on a cached version of it.
The operation Refresh() on the EA collection will actually reload the the entire collection from the database.

You can also do a Repository.GetXXXByGUID() type of operation to "refresh" your object in memory.

The EA application also keeps a cache of objects, so changes you make to the API object may not appear immediately in the EA GUI.


Automation Interface, Add-Ins and Tools / Re: Document Bookmarks
« on: January 11, 2018, 07:54:27 pm »
As I understood it this procedure will replace the bookmark in Work by the contents of a generated RTF report.
Is that what you are looking for?


General Board / Re: SQL to find mult connectors between to elements
« on: January 11, 2018, 12:45:11 am »
That will output all elements with more than one connector. I guess the OP is after a list of connectors for two distinct element?

No it won't, see the grouping.
It will output all element/connector details for all elements that have 2 or more of the same kind of connector to the same element (which makes them a candidate for duplicate connectors, although there might be valid exceptions)


General Board / Re: SQL to find mult connectors between to elements
« on: January 10, 2018, 11:51:39 pm »
try this:

Code: [Select]
select os.ea_guid AS CLASSGUID, os.Object_Type AS CLASSTYPE, os.Name as SourceObject, os.ea_guid as SourceGUID,
c.Connector_Type as ConnectorType, ot.Name as TargetName, ot.ea_guid as targetGUID, count(*)
from ((t_connector c
inner join t_object os on os.Object_ID = c.Start_Object_ID)
inner join t_object ot on ot.Object_ID = c.End_Object_ID)
group by os.ea_guid , os.Object_Type , os.Name , os.ea_guid , c.Connector_Type , ot.Name , ot.ea_guid
having count(*) > 1
order by count(*) desc


General Board / Re: Running script from an specific Element
« on: January 10, 2018, 06:15:13 pm »
Hello Paolo,

We can use context item event to get the script from an element.

We can execute the script using Script Control Class (there are certain limitations)


Thanks, Nabil,

so it's not via the UI directly.


You can use a script to execute the script stored in the tagged value ;) or an add-in.


General Board / Re: Running script from an specific Element
« on: January 10, 2018, 04:52:52 am »
Scripts are stored in the model.
Depending on the script group the script will appear as an option in the context menu.


Hi Henrik,

Als qwerty indicated there is no very easy way.

The somewhat harder way is to write a script that changes the value. You can probably use the snippet provided by Nabil.
In the help there is some information about scripting, and I have a fairly large open source library with all kinds of scripts for EA:
The script will update the fields at the moment it is executed.

The somewhat harder option is to write an add-in. The add-in can react to the event of creating a new attribute and react accordingly, setting the value as default value.
For information on add-ins see

Another option is to use one of my add-ins called EA-Matic That add-in can forward the attribute creation event to a script. That allows you to define in the script what needs to happen when a new attribute is created.




There a possibility that this information is nonetheless stored as a tagged value (suggested by Nibal -> stored in t_attributeTag), even if this particular tagged value is hidden in the GUI.


Yes It is always good to go with API but for accessing Attribute Unsigned value I'm not sure will we be able to do it via API. To update the table you can try Repository.Execute()

you will get many sample out there in forum.

If this information is stored as a tagged value then you can access it using the API.
Repository.Execute is the nuclear option, only to be used by expert users who know what they are doing as it is undocumented and unsupported.
There is a real risk of completely destroying your model if you are not careful



The best way to make sure that your query is correct is to test in in the SQL scratch pad (open model search, edit the search and select SQL scratch pad.)
Just make sure you replace the #OBJECTID#/#PACKAGEID#/#DIAGRAMID# macro's with actual id's.

Things that are suspicious in your query:
- distinct (o.object_ID) why the parentheses? You don't normally use parentheses for distinct
- as "Note-Formatted" double quotes are almost never used in any SQL dialect. Use square brackets instead e.g. [Note-Formatted]

Other than the error you are getting is often seen when there is an issue with some kind of xml processing internally, but it is a very general non-descript error messages that doesn't help you much in resolving the problem.

I do believe that I've seen some improvements in that area in the latest versions.

Also, you didn't mention what type of database you are using. That determines the SQL dialect you should use (and whether to use [Note.Formatted] or [Note-Formatted])


I've managed to get headings 1 to 9 working consistently in my stylesheet.
The trick is to have them all use the same list override for all heading styles.
You can download a sample model containing the stylesheet from my website:


You should understand what Paolo said. You're living a wrong life here. Version control is fine for code text, but not for UML models.


Yes and No.
I use version control only in the case that I have different repositories sharing the same part of a model.
We only go forward, never go back, and we never (try to) merge.
In these circumstances using version control is perfectly possible.
This is just a bug. If the users always uncheck all the checkboxes in the dialog there is never a a problem.
For this particular client I'm not even interested in fixed the bug. Some kind of option to never restore external references would be find for me.
There is an option in the version control setting with regards to external references, but that does not have the effect I thought it would have. The dialog still appeared despite turning off the setting.


I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.
But that's exactly what it is. ClassA is a reference to an element external to the package that is being checked in.
No it isn't. It's a diagram object owned by the package B that is being deleted and then comes back only because it references an element that is not owned by package B?
That is just ridiculous, even more so since the ClassA actually still exists in the model, so it should be easy enough to check for that.
The current situation is a bug that will corrupt the model, often weeks or months after someone allows the external references to be added to the xmi file.

There should be at least an option to prevent this type of behavior.


Pages: 1 ... 3 4 [5] 6 7 ... 525