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.


Topics - philchudley

Pages: [1] 2 3 ... 8
1
General Board / Disable the abilty to Manage Add-Ins
« on: September 18, 2018, 08:06:24 pm »
I have received a request from a client to restrict who can disable / enable Add-ins / Extensions.

Having checked the List of Available Permissions, there does not appear to be any such permission, and a test of:
  • creating a new user with no permissions at all
  • logging in as that user
  • selected to Manage Add-ins, was able to enable / disable any listed Add-in

As workflow scripts only apply to selected element properties, that route won't work either.

Is there a way to prevent users from Managing Add-Ins?

Thanks
Phil

2
General Board / Delete / Remove a List Override
« on: June 28, 2018, 07:43:43 pm »
OK I have defined a list item and list override and have set list numbering with my list override to Heading 1 in my template.

How do I remove the list numbering on the Heading 1? The List Numbering menu item is checked, upon clicking I just get a list of list overrides, with option to set to none.

Alternatively, how can I remove an item list and/or list override? There appears to be no option to do so if there is indeed no option, maybe there should be?

If all else fails I could delve into the tables and remove directly from there I guess.

Any suggestions?

Phil

3
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

4
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

5
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

6
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 
 all are simply ignored during documentation generation and all element names appear on a single line of text.

Phil

7
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

8
Automation Interface, Add-Ins and Tools / Tagged Value Groups
« on: August 01, 2017, 10:54:29 pm »
Hi All

Does anyone know a method in script (or SQL) to discover what Tagged Value Group a given tagged value is in?

I know that tagged value group membership is defined with a MDG Profile stereotype in the element attribute _tagGroupings, but how to access this information within a script / addin?

Cheers

Phil

9
General Board / Respository Usage Statistics
« on: January 10, 2017, 10:46:05 pm »
Hi All

I have a need to collect and report on repository usage statistics in a multi-user repository with security enabled. For example, when users have connected, disconnected and their total connect time.

I believe EA does not capture this data within a repository.

One method would be to create an add-in that responds to the File_Open and File_Code broadcast events, and creates a log file which can the processed at some future stage.

Is there any method that does not use an add-in at all?

Cheers

Phil

10
Bugs and Issues / ArchiMate 3.0 and Compositions
« on: November 30, 2016, 01:41:45 am »
When using ArchiMate 2.0 and EA (prior to version 13) and in Version 13, creating a composition relationship between two elements, and then nesting the child inside its parent, causes the composition relationship to be hidden on the diagram, which is exactly what I want, and is very useful.

However, I have just migrated a model from ArchiMate 2.0 to ArchiMate 3.0, and these compositions are NOT hidden within nested structures, which is disappointing and rather annoying.

Anyone else noticed this? If so, has anyone reported this?

Phil

11
Automation Interface, Add-Ins and Tools / SelectTargetPackage Dialog
« on: November 07, 2016, 08:22:22 pm »
Hi All

Does anyone know if there is an API function to invoke the SelectTargetPackage dialog?

I am aware of InvokeConsructPicker but this is a different dialog to the one I am after.

I have searched the AIP reference but cannot seem to find such a function.

Cheers

Phil

12
Hi All

I am developing a script and using JScript (this the choice of the client for whom I am developing the script).

This is my code

   projectInterface.GenerateXSD(thePackage.PackageGUID, "C\EA-Projects\Generated1.xsd", "Unicode (UTF-8)", "GenGlobalElement=1");
   Session.Prompt("Error " + projectInterface.GetLastError(), promptOK);

Upon execution I receive an Error from EA informing me that Access is Denied. I certainly have write access to the file specified.
The result of the GetLastError is

Please specify output file name.

Which clearly I have.

Using the same file path and options, via invoking Generate XML Schema from the Project Browser package works just fine.

I get the same error whether the filename is hardcoded or accepted from Save As dialog, and no matter what the file path is.

The PackageGUID is definitely the root package of an XSD schema.

Ah just noticed the User Guide specifies that the PackgeGUID must be in XML format, but does not state what that should look like.
I am simply passing the GUID as a string, so this maybe the cause.

What should the PackageGUID string look like in XML format?

Any ideas?

Cheers

Phil

13
Bugs and Issues / Glossary Tool Tip
« on: September 02, 2016, 11:43:23 pm »
I do not use the glossary feature very often, but in EA version 12.1 and before the glossary meaning for a term was displayed in a tool tip upon a mouse rollover.

However when using EA version 13 build 1304 I found this tool tip has been replaced with

CTRL + Click to follow link.

This opens the Glossary Detail dialog where upon this glossary term can be modified or even deleted (provided the User has privileges to do so!).

Please revert back to the previous before, which oddly is how it is documented in the EA Version 13 help (that is EA version 13 glossary tool tips behave differently to that specified in the help).

Cheers

Phil

14
General Board / Set Page size in a Documentation Template
« on: August 25, 2016, 07:16:48 pm »
Hi

This is a basic question and I should know the answer, but what I try does not appear to work.

Question : How do you set the page size for a Documentation template to be A3?

I have tried Using the Document Ribbon / Edit / File / Printer Setup, but the document still prints A4.

Cannot find anywhere else to set the page size for the Template.

Using EA version 13 beta

Cheers

Phil

15
Bugs and Issues / EA Version 13 - GetMenuItem IsChecked issue
« on: August 18, 2016, 07:55:35 pm »
Hi All

I have an extension that uses the IsChecked option for its menu.

In previous versions of EA, the IsChecked option when set to true rendered the menu with a tick mark, however this does not appear to work in EA version 13.

Regardless of the setting of IsChecked (within the method GetMenuItem) the extension is always rendered with no tick marks.

Anyone else noticed this?

Cheers

Phil

Pages: [1] 2 3 ... 8