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 - Helmut Ortmann

Pages: 1 ... 4 5 [6] 7 8 ... 62

I am trying to develop an Add-In Search with C# according to

The Add-In works correctly but EA doesn't recognize the Add-In Search. I would expect to see the Search in 'Find in Project' category Addin. Nothing shows up.

I tried the following signatures and checked it in the DLL with ildasm.exe. The methods are public methods in the Add-In Class.

- public string AddInSearchSample2(EA.Repository repository, string searchText, out string xmlResults)
- public string AddInSearchSample2(EA.Repository repository, string searchText, ref string xmlResults)
- public object AddInSearchSample2(EA.Repository repository, string searchText, out string xmlResults)
- public object AddInSearchSample2(EA.Repository repository, string searchText, ref string xmlResults)

Has someone experiences, examples or ideas?



Hi Mark,

please file a bug report.

Kind regards,


Hi Julian,

The free Open Source hoTools now contains Addi═nSimple. AddInSimple is a basic Add-In which:
- Shows how to develop an Add-In in C#
- Demonstrates how to implement Shape Script print methods
- Ready to use sample to print parent properties like Tags, Name,
- Easy to adapt to other needs

You find it:
- Documentation
- Download

I based the implementation on:
- Geert Bellekens AddIn
- Aaron Bell

Additional you find the method:
- public string GetParentProperty(EA.Repository repository, string eaGuid, object theParams) {..}
- Print properties of the parent object like Name, Alias, Tagged Values,
- Details in the implementation

With this sample application, it should be easy to implement other needed features.

Kind regards,


Hi Julian,

one issue is that there are thousands of things to do with Add-Ins. Only rarely matches Add-Ins the need of others.

I know a lot of projects who want to publish libraries of functions. In the end, it mostly don't work

If I have understood you right you want to visualize a tagged value of a parent element with an Add-In used by a shape script.

Maybe, if I like to spend some time I'll make a little demo Add-In which exposes this feature. Just to see how it works.

If an Addin does some accesses in a shape script it probably will slow down rendering diagrams which use this feature a lot.

Think, if my specification is correct and maybe I'll do it for fun.

Kind regards,


Hi Mr Stuff,

I don't catch your issue. Think about making a little concrete example. What embedded objects do you have in mind? A little picture would make it clear.

In EA you can control the appearance of:
- Diagram
- Diagram nodes
- Diagram links

If you want e.g. not show Ports on a Diagram, there is at least one Addin that solves the issue.

Kind regards,


Hi Mr. Stuff,

I haven't got the whole picture of what an Addin or Script should do for you. May be you write a little specification and try to generalize your issue at hand. A small example would be helpful. If you find something of general interest, there might be someone who can help you.

If you want to get information from a Diagram Node EA offers some possibilities out of the box and by scripting with just a few lines of code. E.g.:
- You can visualize arbitrary information in the document view
- Make a note and assign Element property/feature/tagged values to this note (powerful and easy)
- Hyperlink to show other Diagrams, Elements,
- etc.

Kind regards,


Hi Gary,

I see the following possibilities for diagrams:
- Using the EA Style Panel
- Diagram Style with hoTools (Open Source, free)
- Write a Script / Addin (qwerties books help a lot)

May be there is a way to change the Visual Style An *.xml file or something like this.

Kind regards,


General Board / Re: Update Text for Hyperlinks to Elements
« on: July 15, 2017, 12:15:27 am »

updating the Notes/Description isn't a complex task if you know how. The following snippet shows how to do it with C#.

I may integrate the functionality in hoTools Then it's just a Click away.

Best regards,


Code: [Select]
        /// <summary>
        /// Change EA Hyperlinks of type package, element, diagram, attribute, operation in notes string.
        /// </summary>
        /// <param name="rep"></param>
        /// <param name="s">Reference to the Notes string</param>
        /// <returns>True if string is changed</returns>
        private static bool ChangeHyperLinksInNote(Repository rep, ref string s)
            // Possible replacements for element, package, feature(Attribute or Operation)
            Regex rgx = new Regex(@"(a href=""\$(element|diagram|package|feature)://({[ABCDEF0123456789-]+})[^u]*u>)([^<]*)",
            Match m = rgx.Match(s);
            bool changeNote = false;
            while (m.Success)
                bool changeNoteItem = false;
                string guid = m.Groups[3].Value;
                string type = m.Groups[2].Value;
                string name = "don't exists";
                switch (type)
                    case "package":
                    case "element":
                        EA.Element elReplace = rep.GetElementByGuid(guid);
                        if (elReplace != null) name = $"{elReplace.Name}";
                        changeNote = true;
                        changeNoteItem = true;

                    // Operation/Attribute
                    case "feature":

                        EA.Attribute aReplace = rep.GetAttributeByGuid(guid);
                        if (aReplace != null)
                            name = aReplace.Name;
                            EA.Method mReplace = rep.GetMethodByGuid(guid);
                            if (mReplace != null) name = mReplace.Name;
                        changeNote = true;
                        changeNoteItem = true;

                    // EntryName:   'PackageName' : 'DiagramName'
                    case "diagram":
                        EA.Diagram diaReplace = (EA.Diagram) rep.GetDiagramByGuid(guid);
                        if (diaReplace != null)
                            EA.Package pkg = rep.GetPackageByID(diaReplace.PackageID);
                            name = $"{pkg.Name} : {diaReplace.Name}";
                        changeNote = true;
                        changeNoteItem = true;
                    // do nothing
                // current item changed
                if (changeNoteItem)
                    s = s.Replace($"{m.Groups[0].Value}", $"{m.Groups[1].Value}{name}");

                m = m.NextMatch();
            return changeNote;


in Visual Studio Project Properties, Debug for the DEBUG configuration activate
- Enable 'native code debugging'.

The forum also contains a thread about this.

Kind regards,


General Board / Re: Showing constraints
« on: July 11, 2017, 02:18:57 pm »

you can:
- Attach a note to the class (Link from Class to Note)
- Right Click on the Link from Class to Note, Select 'Link this to an Element Feature', Select and choose
-- Constraint for the Class Constraint
-- Attribute for the Class Attribute

As far as I know, you can't visualize the Attribute Constraint on the Diagram.

Kind regards,


General Board / Re: Structured Node - Activity
« on: July 03, 2017, 12:20:26 am »

When you drag a 'Structured Activity' from the Toolbox to the canvas, you can either create a Simple Composite or from a selection of  'Structured'. See also the online help (F1 in the diagram).

Just give it a try, and you quickly understand it. Drag a 'Structured Activity' from the Toolbox to an Activity Diagram and observe Diagram and Project Browser. With ALT+G you can navigate from Diagram Element to specification in Browser.

'Simple Composite':
It's an Activity which is refined by an Activity Diagram. A useful construct, often called Composite. You will learn to appriciate it. It hides complexity and with a double click you jump into the refinement.

Personally, I never use them. If I have e.g. a loop I usually model it as a 'Composite Activity'/'Simple Composite'. The name is then something like 'Loop over all..'. The refinement diagram (composite) contains what inside the loop happens. If you use such a construction you get easy to understand Activity diagrams. If you try to model loops with Case and Merge you soon get a messy diagram. It takes long to understand the sense behind it.
Another possibility is to use <<Stereotypes>> like <<loop>>.

Kind regards,


General Board / Re: Autonumbering on stereotype level
« on: June 30, 2017, 04:03:58 pm »

I'm working on integrating Auto Counter on Stereotype level in Open Source hoTools. Soon, I'll release it

If you are interested or have ideas, read the WiKi and contact me. The basic ideas are:
- Auto numbering on Stereotype level (Type, Stereotype)
- For Name and Alias
- Configure by format string like 'My0.00.0.0_Best'  (0=placeholder for numerical value)
- Support Diagram with Drag and Drop, the usual way
- New Auto Numbering for the whole model and choosen Type/Stereotype
- Configurable in Settings.json


Kind regards,


Thanks Uffe,

it works the way you described it. I only tried Tagged Value and that doesn't work.

Best regards,



you may use Dynamic Documents to see the Tagged value of the selected Diagram Element in the Document Window. You can define what you want to see of a selected element. There is also a Webinar available.

I know, it's not exactly what you wants and I'm not sure if it works for Tagged Values of type Memo.

Kind regards,


General Board / Re: Autonumbering on stereotype level
« on: June 26, 2017, 06:37:36 pm »

in principle it's simple: Just override the EA Broadcast Event  'EA_OnPostNewElement'.

The drawback is:
EA currently has a bug that it doesn't support the Broadcast Event 'EA_OnPostNewElement' with the Specification Manager.

The other thing is that there are a lot of Use Case. Just for example:
- Make the created number unique for stereotype in the whole model
- Unique in package or package branch
- Handle initial applying the numbers to existing Elements (e.g. use creation date to give a reasonable sequence).

I have implemented a basic approach in the open source 'hoTools'. It's not released yet but you can explore or contribute to code and ideas.

You can configure with JSON:
- Stereotype
- Start value
- Format to build like 'myRequirement_0.00.00_fun'
- ..

Currently, I'm thinking about applying the rules to existing Elements (based on e.g. creation date).

If you like to contribute or have ideas just contact me.

Best regards,



Pages: 1 ... 4 5 [6] 7 8 ... 62