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 ... 32 33 [34] 35 36 37
Not that I know off, however if you can live with a stereotype it is very easy to change an elements appearance via tagged values using shapescripts.

Not sure if this of any help, but maybe worth a look



Automation Interface, Add-Ins and Tools / Re: MergeInstructions
« on: February 19, 2011, 03:36:45 am »
I haven't actually performed any automation of baselines, but I have wriiten a number of Add-Ins.

From the EA User Guide the DoBaseLineMerge has the following signature

DoBaselineMerge(string PackageGUID, string Baseline, string MergeInstructions, string ConnectString)

It appears from your post, that you have not specifed the package name, so perhaps (I am guessing), EA tries to achieve a merge using the latest baseline which happens to be identical to the current model?

Although I would have thought that if the signature was incorrect, then the code would not have compiled.

A colleague of mine has automated baseline merges, so I'll dig out his code, and hopefully post a more detailed reply.



Automation Interface, Add-Ins and Tools / Re: Hide Diagram Note Element
« on: January 29, 2011, 02:09:05 am »
Here's my suggestion, assuming you are using version 8

Use diagram filters to elements, this works the opposite way round to your first think!

I am not sure how you add your notes, but the following is how you would hide a Note Element and a Text Element (both added from the Coomon toolbox)

1) Open up the Diagram Filters view
2) Create a filter which selects elements whose object type is One Of every object type EXCEPT NOTE and TEXT
3) Set the Filter option to Hide from the DropDown list
4) Check the filter on, and you should see all the Notes/Text dissapear

Then when you create your documentation the diagram will print without the notes (confirmed by Print Preview)

In step 2), use the ... button to select all element types and then unselect NOTE and TEXT

If you are using just one note type then the filter is just a simple object type not equals

I am not sure if there is an API method to apply an existing filter to a diagram, I cannot locate one in the current user guide

Hope this helps



Many thanks for the replies, I will try these ideas out when I return the office on Monday



Hi All,

How do you remove a connector from an element. I have tried using the Delete and DeleteAt methods followed by a Refresh for the Elements's connectors collection.

Examine the size of the collection confirms that something has in fact been deleted, but examination of the Element's propery dialog Links tab shows the connector to still be there!

It is also present on all diagrams where this element is present.

Do I also have to remove the connector from the Diagram's DiagramLinks collection as well?

The code examples in the User Guide show the creation of a new connector (no diagram is necessary), but do not show the removal of a connector.

Any advice will be most appreciated



Automation Interface, Add-Ins and Tools / Re: Interfaces (IDual vs I)
« on: January 11, 2011, 08:56:30 pm »
Thanks Alistair, that clarifies it for me I use C# and so will continue to use the IDual

Thanks again


Automation Interface, Add-Ins and Tools / Interfaces (IDual vs I)
« on: January 11, 2011, 04:05:52 am »
Hi All

Probably a question directed at the Sparxians, but in the object model API the Interfaces appear to be duplicated, IDualElement, IElement, IDualCollection, ICollection etc

Is there any fundamental difference between the IDual version and the I version?

If not why are both supplied? If there is what is the difference and when should each be used?

If have written Add-ins using IDual and I have written Add-ins using I, and I cannot see any noticable difference

Any thoughts?

Automation Interface, Add-Ins and Tools / Re: requirements trace
« on: December 14, 2010, 03:10:49 am »

Assuming that you wish to start at an element and then identify the requirements realised by an element, then the following would work

public ArrayList getAllRequirements(EA.IDualElement useCase)
            // Get the connectors for this use case
            EA.IDualCollection connectors = useCase.Connectors;

            ArrayList requirements = new ArrayList();

            // iterate the connectors looking for realizations and add the
            // requirement which it is the supplier to the ArrayList

            foreach (EA.IDualConnector connector in connectors)
                if (connector.Type == "Realisation")
                    EA.IDualElement common = currentModel.GetElementByID(connector.SupplierID);
                    if (common.Type == "Requirement")
            return requirements;

Where currentModel is an instance of an EA.Repository class

The above code template could be adapted for, beginning at a Requirements then returning all elements realising that requirement, something, like this:

public ArrayList getAllRealisingElements(EA.IDualElement requirement)
            // Get the connectors for this requirement
            EA.IDualCollection connectors = requirement.Connectors;

            ArrayList realisers = new ArrayList();

            // iterate the connectors looking for realizations and add the
            // element which it is the client to the ArrayList

            foreach (EA.IDualConnector connector in connectors)
                if (connector.Type == "Realisation")
                    EA.IDualElement common = currentModel.GetElementByID(connector.ClientID);
            return requirements;




The query

SELECT DISTINCT ProductName FROM t_datatypes WHERE Type='Code'

works, but only returns a subset of the languages  :-[

That is

Visual Basic

this is despite that fact that I have the Ultimate licence

I have found that the MDG Technologies appear to update the t-datatypes table upon loading, so I would expect to see languages like ADA for example. This is clear from the underlying XML since you can add your own language to the list by using an MDG

So where are these datatypes going?

Thanks Geert I did find the t_complexitytypes about 15 mins after my post, but thanks for the info regarding the windows registry setting

I will give the t_datatypes query a go,

Thnaks again

Hi All

I have a need in an Add-In to obtain the current repository values for the following:


I can obtain the values in Status by using the Repository method GetReferenceList("Status")

However what about the other two?

Yes I could "hard code" the values, but I am seeking a more elegant solution where I can obtain the Language settings (as shown in the code generation toolbar) directly from the repository, similarly with the Complexity.

If this is not possible, is there a way I can detect if the user has set the "Extend Complexity" option on?

This would allow me to use one of two "hard coded" settings if obtaining the values directly is not possible.

I have checked the EA version 8.0 User Guide and have examined the Enumerations but cannot find what I require there

Any suggestions?



Many many thanks for all the replies, most helpful!


Hi All

Does anyone know how a symbol can be drawn in front of the text present in a label in a shapescript?

The effect I am after is similar to the "reading direction" black triangle for an association.

There appears to be no way to affect the text position, I can get the symbol, but the text is placed on top rather than alongside


Automation Interface, Add-Ins and Tools / Re: MDG's SysML Add-In
« on: September 17, 2010, 06:35:24 pm »
EA's built in SysML 1.1 is more or less SysML compliant. I use it occasionally, but I have noticed that you cannot display a Parts compartment within a Block element for example (you can in the MDG SysML 1.0 version)

There are other similar compartments defined in the SysML which again are not supported by Sparx

Because a Requirement element is already in EA, SysML uses the same element and hence its appearance differs from that defined in SysML.

Apart from this minor niggles, I find the SysML 1.1 works just fine. (The simulation of then parametric diagrams is a little limited however)



Hi Guys

Problem solved, the query was changed to

queryResult = repository.SQLQuery(@"SELECT UserLogin, FirstName, Surname FROM t_secuser " +
                              @"WHERE USERID = '" + userID.InnerText + "'");

That is not using * in the SELECT and all is fine now



Pages: 1 ... 32 33 [34] 35 36 37