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 [4] 5 6 ... 38
46
Fixed it!

The problem was with the XML encoding string

It should be utf-8 and not Unicode (UTF-8)

What confused me was that using the Code Generation from the Project Browser, the dialog lists Unicode (UTF-8), hence I used that in the script.

However, upon examining a generated XSD schema, I found t should be utf-8, put that in the script and it worked!

My correct call is

projectInterface.GenerateXSD(projectInterface.GUIDtoXML(thePackage.PackageGUID), fileName, "utf-8", "GenGlobalElement=0");

where filename has been obtained as :

var fileName = projectInterface.GetFileNameDialog("", "XML Schema Files (*.xsd)|*.xsd", 1, 2, "C:\\EA-Projects\\", 1);

Cheers
Phil

47
Definite red-face time  :-[ Should have spotted the missing : after C

Added the missing : same result

Access Denied

However, by converting the string GUID to XML using GUIDtoMXL, I get rid of the access denied, but it still does not work  >:(

This time I get

Unspecified error

with GetLastError returning a null string. So no help or clue there.

Cheers

Phil


48
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

49
Uml Process / Re: Specification Manager
« on: September 06, 2016, 10:21:11 pm »
Hi Amy_N

If you are using EA version 13, then tagged values can be added as follows:

1) Open the specification manager
2) Set the Default Type by choosing the Set Default Type section of the Specification Ribbon
3) Select an element that contains the tagged values within the Project Bowser
4) Right-click the Specification Manager title bar and select Add Tagged Value Column
5) In the resultant dialog ensure the check box Tagged Values from Selected Element is selected
6) Choose you Tagged Value from the drop down list

I would imagine a similar process would work in earlier versions of EA.

Cheers

Phil

50
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

51
Bugs and Issues / Re: EA Version 13 - GetMenuItem IsChecked issue
« on: August 30, 2016, 08:25:02 am »
Bug reported to Sparx, which they have confirmed, and just received a reply that this has been fixed in the next release.

Phil

52
General Board / Re: Set Page size in a Documentation Template
« on: August 26, 2016, 06:18:37 pm »
Thanks for your reply

I have found the solution

Using EA version 13 Beta to set the page size:

Use the Document | Edit Ribbon
Select Edit followed by Edit section...

Complete the dialogue for page settings for this template (or section within template)

Using this it should be possible to use mixed paged sizes with a template and within a document (using master and model documents) although I have not tried this.

Cheers

Phil

53
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

54
General Board / Re: Distribute MDG Technology via Cloud Services?
« on: August 19, 2016, 06:30:42 pm »
Using Project (Repository) options you can specify which set of MDGs must be loaded into EA so that the repository will open.

This feature maybe a way to load you MDG conditionally.

Try this:

Connect to your cloud repository and set the list of MDGs (including your custom MDG) and then disconnect. (In EA version 13 this the Configure Ribbon / Model / Options

Start EA and configure the MDGs to exclude your custom MDGs

Cheers

Phil

55
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

56
General Board / Re: Show/Hide SysML Diagram Frame
« on: July 28, 2016, 05:51:25 pm »
Well the SysML diagram does appear in the diagram that you are constructing in the following circumstances

  • Creating an Internal Block Diagram from a Block
    Creating a Parametric Diagram from a Block
    Creating an Activity Diagram from an Activity

In all these cases right-click the element, select New Child Diagram and the select Internal Block Diagram, Parametric Diagram or Activity Diagram from the list

Any Ports, or Activity Parameters will appear on the border of this frame as per the specification of SysML.

I have found that, this diagram must remain as a direct child of its parent, otherwise this frame will disappear and be replaced with its element.

I realise this is different situation to what you are describing in your post, but you may find this information useful.

Cheers

Phil

57
Yes, open the diagram properties (double-click on the diagram background)
Select Element from the left hand side
Uncheck the checkbox named Attributes
Uncheck the checkbox named Operations

Close the dialog

You should now be left with just the classes

Cheers

Phil

58
Hi

I have just tried a small experiment

I created an MDG with nothing other than a toolbox.

I then added a toolbox page, and then added two elements by:

Added two Built-in Type elements, where I selected Activity from the list of stereotypes

I then overwrote the entries so that

Alias = My own text
Stereotype = BPMN2.0::Activity (BPMN2.0::Gateway, etc)


Upon exiting, check that the attributes in the Toolbox page look as follows:

+ BPMN2.0::Activity=Activity

I then generated the MDG in the usual manner

Upon testing (I assume you have the MDG for BPMN 2.0 checked), I simply created a new BPMN Process Diagram, and changed to my toolbox, whereupon both my elements appeared and both where able to be added to the diagram and exhibited the standard BPMN 2.0 behaviour

Hope this makes sense

Send me a PM if you would like my MDG eap file

Cheers

Phil

59
Hi All,

The following is the code I used within my EA Extension EA SafeDelete

        private bool isStructuralElement(EA.Repository repository, EA.Element contextElement)
        {
            // Get the object type
            switch (contextElement.Type)
            {
                case "Port":
                    return true;
                case "ActionPin":
                    return true;
                case "ProvidedInterface":
                    return true;
                case "RequiredInterface":
                    return true;
                case "ActivityParameter":
                    return true;
                case "ExpansionNode":
                    return true;
                case "ObjectNode":
                    return true;
                case "Part":
                    return isNotReferencePart(repository, contextElement);
                default:
                    return false;
            }
        }

        private bool isNotReferencePart(EA.Repository repository, EA.Element contextElement)
        {

            // To find this out, we need to extract and examine the Description field in the
            // contextElement's corresponding entry in the t_xref table

            String tXrefDescription = null;

            string sqlSearch = "SELECT t_xref.Description AS [Description]" +
                               "FROM t_object, t_xref " +
                               "WHERE t_object.ea_guid = '" + contextElement.ElementGUID + "'" +
                               "AND   t_object.ea_guid = t_xref.Client";

            string queryResult = string.Empty;
            queryResult = repository.SQLQuery(sqlSearch);

            XmlDocument requirement = new XmlDocument();
            requirement.LoadXml(queryResult);

            // Examine the result
            XmlNode description = requirement.SelectSingleNode("//Row/Description");
            if (description != null)
            {
                tXrefDescription = description.InnerText;

                // Now, the fun begins, we need to
                //
                // First extract the parts of description (delimited by ;)
                // Extract the value that tells us if the element is a reference Part

                String[] descriptionParts = tXrefDescription.Split(new char[] { ';' });

                // We need the eighth part (index 7)
                //
                // This has the format @VALU=n @ENDVALU
                //
                // So we can just test for a contains of 0 for not a reference part

                return descriptionParts[7].Contains('0');
            }
            return true;
        }

This appears to work for me, don't think I missed any Structural Elements (embedded elements).

Cheers

Phil

60
Thanks Roy, that's helped a lot.

Phil

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