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 2 3 [4] 5 6 ... 59
46
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 https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki/addinshapescript
- Download https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools

I based the implementation on:
- Geert Bellekens AddIn
- Aaron Bell http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1326759082/1#1

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 https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/blob/master/AddInSimple/AddinSimple.cs

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

Kind regards,

Helmut

47
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,

Helmut


48
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,

Helmut

49
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,

Helmut

50
Hi Gary,

I see the following possibilities for diagrams:
- Using the EA Style Panel
  http://sparxsystems.com/enterprise_architect_user_guide/13.5/user_interface/using_the_style_panel.html
- Diagram Style with hoTools (Open Source, free)
  https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki/DiagramGeneralStyles
- Write a Script / Addin (qwerties books help a lot)

May be there is a way to change the Visual Style http://sparxsystems.com/enterprise_architect_user_guide/13.5/user_interface/visualstyles.html. An *.xml file or something like this.

Kind regards,

Helmut

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

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 https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki. Then it's just a Click away.

Best regards,

Helmut

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>)([^<]*)",
                RegexOptions.IgnoreCase);
            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;
                        break;

                    // Operation/Attribute
                    case "feature":

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


                    // 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;
                        break;
                    // do nothing
                    default:
                        break;
                }
                // current item changed
                if (changeNoteItem)
                {
                    s = s.Replace($"{m.Groups[0].Value}", $"{m.Groups[1].Value}{name}");
                }


                m = m.NextMatch();
            }
            return changeNote;
        }

52
Hello,

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,

Helmut

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

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,

Helmut


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

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.

'Other':
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,

Helmut

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

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

WiKi:
- https://github.com/Helmut-Ortmann/EnterpriseArchitect_hoTools/wiki/AutoNumber

Kind regards,

Helmut

56
Thanks Uffe,

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

Best regards,

Helmut

57
Hi,

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,

Helmut



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

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,

Helmut




 

59
Hello,

The SPARX answer:
This is a known issue which is yet to be resolved.

Helmut

60
Thanks for the answer.

I'll file a bug report.

Best regards,

Helmut

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