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 ... 3 4 [5] 6 7 ... 60
61
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;
        }

62
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

63
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


64
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

65
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

66
Thanks Uffe,

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

Best regards,

Helmut

67
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



68
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




 

69
Hello,

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

Helmut

70
Thanks for the answer.

I'll file a bug report.

Best regards,

Helmut

71
Hello,

I try to auto name newly created  Requirements with the EA Broadcast Event 'EA_OnPostNewElement'. It mostly works as expected.

When I add requirements, e.g. Functional Requirments, with the Specification Manager EA don't send the Broadcast Event 'EA_OnPostNewElement'.

Any idea?

Thanks for your help!

Helmut

72
General Board / Re: Autonumbering on stereotype level
« on: June 23, 2017, 07:58:15 am »
Hi mrblack12,

here are a lot of people who want their special solution - for a thank you - maybe.

Here are also a lot of engaged persons who invest their leisure time to answer questions, share their knowledge, develop scripts and presents useful Add-Ins. For nothing!

I think you are working for a company which will profit. If your company is really interested in a solution, get some money and make a little open source project.

In this Forum you'll find people to realize your dreams. Be aware: A general solution beyond "FR-" is some work and not just 10 lines of code.

Please appreciate the great help you get here for nothing. Personally, I don't like remarks like 'The only reply I got..'.

Helmut








73
Automation Interface, Add-Ins and Tools / Re: Publishing Add Ins
« on: June 21, 2017, 11:03:13 pm »
Hello,

a good source is Geerts tutorial on the EA community:
http://community.sparxsystems.com/tutorials/572-44create-your-first-c-enterprise-architect-add-in-in-10-minutes

Kind regards,

Helmut

74
Uml Process / Re: How to use IBD and properties
« on: June 21, 2017, 10:22:17 pm »
Hi Mark,

I have just redone it. It works. I have done it this way:
0. Create Block Definition Diagram with:
1. Create Block 3
2. Create Block 1 + Block 2 as composite part of Block 3
3. Make Association between Block 1 and Block2
3. Name the Association 'MyAssociation'

4. Create Internal Block Diagram from Block 3
5. Drag Block 1 as Property into Diagram (new)
6. Drag Block 2 as Property into Diagram  (new)
7. Make Connector between Properties of Block1 and Block2
8. Right Click on Connector,  Advanced, Set Connector Type
    You can select an Association from BDD or 'none' for the connector in IBD

You may use multiple Associations and connectors. The usefulness is in your responsibility.

Kind regards,

Helmut



75
Hi TheMintRubber,

I checked your Code. It works as expected if I add the below code.

Code: [Select]
public class EAAppInstance
{
public EA.App EaApp { get; }
public int ProcessId { get; }
public EAAppInstance(EA.App eaApp, int processId)
{
EaApp = eaApp;
ProcessId = processId;
}

}

I think the effect is similar to the EA DLL 'SparxSystems.Repository.dll'. This SPARX DLL get's the repository from the passed EA process id and was first released with EA 13. I think this DLL also works for older EA releases, but I'm not sure about.

Thanks a lot for sharing your code. It also gives me an inside how such things work.

Kind regards,

Helmut


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