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 - philchudley

Pages: [1] 2 3 ... 37
1
Suggestions and Requests / Package Indicator for Baselines
« on: June 14, 2018, 09:46:50 pm »
Hi All

When a package is set as a namespace root, or has version control is configured, the package icon in the project browser changes to reflect these settings.

I would like to see the package icon change (say overlay a letter B) when a baseline has been taken for that package.

I know its easy to write a query to list packages with baselines, and in EA 14 there's new feature Find Baselines, but a visual indicator would be great.

Phil

2
Thanks, that clarifies this issue

I'll report back to my client who wants this feature to tell them its just not possible.

Phil

3
Hi All

Please excuse if this has been asked before, but I did a search and could find the answer I am seeking.

Let's say I have defined an MDG called MyMDG.

I also have an extension that is managing elements created using stereotypes defined within the MDG.

I now wish to create an ad-hoc tagged value within the extension that is included on the MyMDG tab for the tagged values. Here's what I have got

newTag = myElement.TaggedValues.AddNew("MyMDG::My Tag", "");

This adds the tag correctly and it shows in the MyMDG tab BUT, the tag name shows as MyMDG::MyTag, rather than MyTag

How can the prefix of the MDG name be removed?

I have tried

a) adding to TaggedValuesEx - same effect
b) stripping off the MDG prefix from the tag name after it has been added - moves the tag to the Tag tab

Any ideas?

Thanks

Phil

4
The only work around I know off is

Open the properties for the Chrome short cut on the desktop
Modify the Target property so as to append the following the text already there

--allow-file-access-from-files

Save

Chrome should now open the generated HTML

Phil

5
General Board / Re: Stereotype, tagged values, and Integer types
« on: April 19, 2018, 12:57:19 am »
Hi Martin

There is indeed a tagged value type that suits your needs, define it as follows:

Type=Spin;
LowerBound=0;
UpperBound=127;

There is an optional default defined as

Default= 0;

Hope this helps

Phil

6
Thanks Geert, I will give it a try

Phil

7
Hi All

Let's say I define an MDG with a stereotype named ABC which is based upon a meta class of UML::Class

I then define attributes (tagged values) and a shapescript within ABC as per usual

I now add a new stereotype XYZ, which is connected to ABC via a Generalisation connector, hence XYZ inherits from ABC

I generate the MDG, and test

Lo and behold the tagged values are inherited as expected, but alas the shapescript is not inherited

I suppose this is the intended behaviour, but just in case I have missed something, can shapescripts be inherited? If so how?

If not (as I suspect), then no option other than to copy the shapescript to all subclasses.

Thanks

Phil

8
General Board / Re: How to report on elements contained on a diagram
« on: January 23, 2018, 11:51:15 pm »
Try this:

  • Open the diagram properties for the diagram containing the elements to be reported on
  • Select Diagram in the tree on the left hand side
  • Check the check box labelled Add each contained element in Documentation
  • Close the Diagram Propeties

Then in your document template

  • Check Package and Diagram
  • Expand the Diagram check box and select Element

Add the data fields in the Element tags

If you wish you can use Document Options to filter the report for selected element types, etc

Phil

9
Hi All

I have solved the problem

The delimiter to be used is <p> (HTML Paragraph)

The string representing the custom field is added to the XML with a formatted attribute with a value of 1

Cheers

Phil

10
Hi All

I am developing a script for a documentation template fragment.

Part of this involves processing a list of GUIDS from a refGUIDList tagged value, getting each GUID is easy, but as part of the XML returned which contains several custom fields, I wish to return a CustomField called, say ELELIST which is a newline delimited string of element names

Does anyone know how to achieve this?

I have tried using \n as the delimiter as well as &#13;&#10; all are simply ignored during documentation generation and all element names appear on a single line of text.

Phil

11
Thanks for all the help guys

I have now got the Add In window working perfectly

Cheers

Phil

12
Hi All

I am attempting to add a custom window to an addin and have used Sparx's rather brief notes

http://sparxsystems.com/enterprise_architect_user_guide/13.5/automation/custom_docked_window.html

However the addiin window is not added:

I am using Visual Studio 2013 and C# .Net 4.5

My Code is as below:

The very simple Test Addin:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestAddIn
{
    public class TestAddIn
    {
        // ----------------------------------------------------------------------
        // Menu Strings
        // ----------------------------------------------------------------------

        private String menuHeader = null;
        private String[] menuOptions = { null };

        private bool safeDeleteIsEnabled;
        private MyCustomControl myCustomControl;       
 
        //-----------------------------------------------------------------------
        // Constructor
        //-----------------------------------------------------------------------

        public TestAddIn()
        {
            safeDeleteIsEnabled = true;
            menuHeader = "-&Tester";
            menuOptions = new String[] { "&Checked", "-", "&Unchecked", "-", "&Show Window", "&Hide Window"};

        }

        // Enterprise Architect standard extension methods

        public void EA_Connect(EA.Repository repository)
        {

            myCustomControl = (MyCustomControl)repository.AddWindow
                     ("Test Addin", "TestAddIn.MyCustomControl");
            if (myCustomControl == null)
            {
                MessageBox.Show("Test AaddIn Custom Window not added");
            }
            else
            {
                MessageBox.Show("Test AddIn Custom Window added);
         }
        }

        public void EA_Disconnect()
        {
            GC.Collect();
            GC.WaitForPendingFinalizers();
        }

        public object EA_GetMenuItems(EA.Repository repository,
                                      string menuLocation,
                                      string menuName)
        {

            if (menuName == String.Empty)
            {
                //return top level menu option
                return menuHeader;
            }
            if (menuName == this.menuHeader)
            {
                // return submenu options
                return menuOptions;
            }
            else
            {
                return string.Empty;
            }
        }

        public void EA_GetMenuState(EA.Repository repository,
                                    string menuLocation,
                                    string menuName,
                                    string itemName,
                                    ref bool isEnabled,
                                    ref bool isChecked)
        {
            switch (menuLocation)
            {
                case "MainMenu":
                    switch (itemName)
                    {
                        case "&Checked":
                            isEnabled = true;
                            isChecked = safeDeleteIsEnabled;
                            break;
                        case "&Unchecked":
                            isEnabled = true;
                            isChecked = !safeDeleteIsEnabled;
                            break;
                    }
                    break;
            }
        }

        public void EA_MenuClick(EA.Repository repository,
                                    string menuLocation,
                                    string menuName,
                                    string itemName)
        {
            switch (itemName)
            {
                case "&Checked":
                    safeDeleteIsEnabled = !safeDeleteIsEnabled;
                    break;
                case "&Unchecked":
                    safeDeleteIsEnabled = !safeDeleteIsEnabled;
                    break;
            }
        }
    }

}

The addin window has been added to the solutions as a Visual Studio Custom Control and the Code is:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestAddIn
{
    public partial class MyCustomControl : Control
    {
        public MyCustomControl()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs pe)
        {
            base.OnPaint(pe);
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}

Everything builds fine and the addin works fine, but the reference nyCustomControl is always null thus indicating the Custom Window has not not been added.

Using the Extend | Manage | Add-in Windows returns No loaded add-ins are using this window

I must be missing something, but what?

All namespaces and names are correct.s

One curious thing, the article by Sparx on Custom Windows, mentions an ActiveX Custom Control and and OCX file. I do not see any OCX file in my build, so if this is what is missing, how is such an OCX file created, and where should it be located.

Any help or advice will be most appreciated.

Phil

13
Check the ID used when the MDG is generated.

The ID must be the same name as the name used in the MDG packages, for example, if using the Model Wizard to create an MDG project browser structure, you are prompted for a name, let's say you entered MYMDG, this name is then used throughout the package structure for the MDG model.

When generating the MDG ensure that you use MYMDG as the ID, then all should be OK.

Once more thing, the ID cannot be more than 12 characters, so when choosing a name for the MDG bear this in mind.

Hope this helps
Phil

14
Uml Process / Re: How to change default programming language?
« on: October 03, 2017, 07:24:11 pm »
In addition to what Geert has suggested you can make the Code Generation Toolbar visible:

1) From the Start Ribbon select the Preferences drop down and select Customize from the menu
2) Select Toolbars
3) Check Code Generation

Select C# from the drop down in the Code Generation Toolbar

Phil


15
This is what I do

1) Model the callable process on a temporary diagrams, make it a composite element, set the sub-process and callable tagged values.
2) Double-click and model the process.
3) I have a package in my BPMN 2.0 elements library called Callable Processes, I move the callable process from 1) together with its child diagram and elements to this package,
4) Delete the temporary diagram.
5) When I want to use by callable process(es) in other process diagrams, simple re-use from the library package as LINK

Changing the name in the library, will of course change the name wherever the callable process has been used.

Phil

Pages: [1] 2 3 ... 37