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

2
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

3
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

4
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

5
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

6
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

7
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

8
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

9
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

10
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

11
Bugs and Issues / EA Version 13 Beta - EA-GetMenuItems issue
« on: July 08, 2016, 01:01:51 am »
Here's a good one for you EA guys.

I have two EA Extensions which when used with EA version 13 Beta, are placed on the Extend ribbon. One extension works just fine, the other threw a null pointer exception and caused EA to crash when the extension was selected on its ribbon entry.

The exception was being thrown in the event EA_GetMenuItems.

Upon some investigation I discovered what the problem was. It was due to the value in the parameter menuLocation

When the extension was clicked on its ribbon, the value returned in menuLocation is Diagram ... :-[ and of course as there is no repository open let alone any diagram, its not surprising I get a null pointer!

Surely, when selecting an Extension from the Ribbon, I would expect the menuLocation to be MainMenu (or even a new value Ribbon), but Diagram? No way.

Worked around it now, but thought you like to know in case the same problem occurs in your extensions in EA version 13.

Cheers

Phil

12
General Board / SysML Simulation OpenModelica and EA version 13 Beta
« on: July 07, 2016, 08:55:24 pm »
Hi All

Am trying out the new SysML simulation in EA version 13 Beta and am using the section entitled Creating a Parametric Model in EA version 13 User Guide as an aid.

The first basic example went well, but I am stuck on the second example which is using Connected Constraint Properties.

I have modelled all the Constraint Blocks, Block and Parametric Diagrams, but the guide states:

Provide values (arg_a = 2, arg_b = 3, arg_c = 4, arg_d = 5) in a data set

This data set is then selected in the Configure SysML Simulation dialog

Question?

What kind of element is used for the Data Set? I cannot find any such element anywhere on any toolbox.


Am using SysML 1.4 MDG

Cheers

Phil

13
General Board / Floating Licence on AWS VM
« on: January 30, 2016, 01:37:49 am »
Hi All

Has anyone had any success in locating floating licences on an AWS VM EC2 Windows 2008 server instance?

I ask because a client on mine has tried and failed.

EA fails to connect to the AWS VM using a elastic IP address (which is static and does not change)

The Security Group for the AWS VM are set to accept incoming TCP on all from all hosts

Have also set firewall rules to allow access via 7770 on bot the VM and the client machine

Any advice most welcome

Cheers

Phil

14
Suggestions and Requests / SysML 1.3 Activity Diagrams
« on: November 20, 2014, 09:26:39 pm »
Support for SysML 1.3 has imported significantly over the versions. We now have much closer alignment with the OMG Spec, particularly in the area of Blocks / Ports and Block / Requirement Compartments.

However one area is still lagging behind, namely Activity Diagrams

Apart from some stereotypes it is pretty much the same as UML

With version 12 upcoming may I request the following enhancements

1) Dashed lines for Control Flow (as per OMG SysML 1.3 spec)
2) Support for Parameter Sets
3) Stereotypes visible for Activity Parameters and Action Pins (for example <<optional>>
4) Alternate format for Interrupt Flow, that is as a "normal" Control / Object Flow, but with a small "lightning bolt" floating (like a label) near its middle
5) Re-sizeable Activity Parameters so that the name can be placed inside the Parameter symbol

Many thanks for your consideration

15
Suggestions and Requests / Othogonal Default Line Style
« on: March 26, 2012, 10:11:07 pm »
Hi All

Anyone else out there just HATE the way that connectors default to Orthogonal Rounded in some MDGS? BPMN 2.0 and Archimate 2.0 spring to mind  >:(

These connectors are extremely frustrating and seem to have a mind of their own. I spend a lot of time making the connector appear as I want, save the diagram, then only to find that when I move some elements the connectors are all messed up again!  >:(  >:(

[highlight]PLEASE, PLEASE in the next release revert the line style default to Custom so we can have control.[/highlight]

Yes I can change the line style after adding the connector, but until such time as to when we can select multiple connectors and change the line style on a selection, the choice of Orthogonal as the default is causing much unnecessary work.

Here's hoping

Cheers

Phil

Pages: [1] 2 3 ... 8