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

Pages: [1]
1
General Board / Re: The Project Tree
« on: April 20, 2004, 03:32:41 pm »
Hi Thomas, Bruce

Is there any way that we can set the heirarchical position of the element using the Automation interface?

For example, I would like to add some elements to an exisiting element, but as child elements.

Currently I am using AddNew() on the parent element's Elements collection (heh.. that looks confusing). But after Update() and Refresh() the new children do not seem to be showing up in the project tree view at all.

I created some of my own elements in the actual EA application to experiment. I structured them hierarchically and noticed that child elements appear in both the package's Elements collection and in the Elements collection of their parent element. This has me confused, should I be adding the new child element to the parent element's Elements collection or the package's Elements collection

Any advice would be much appreciated!

Thanks,

Ian

I started a related thread at http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.cgi?board=Automation;action=display;num=1082417487

2
Has anyone else encountered a InvalidCastException when trying to add tagged values to a connector?

Connector myConnector = supplierElement.Connectors.AddNew("Depends on", "Dependency");

TaggedValue t = (TaggedValue)myConnector.TaggedValues.AddNew("A-Tag", "");

C# complains that I have invalidly cast to a TaggedValue, but I am doing this for adding TaggedValues to all my elements. Maybe this isn't implemented for Connectors?

Can someone else confirm this?

Thanks,

Ian

[edit] Note to self, RTFM, Connector.TaggedValues.AddNew() returns a ConnectorTag *slap* [/edit]

 

3
Automation Interface, Add-Ins and Tools / Adding to root packages
« on: May 13, 2004, 10:10:09 pm »
Can someone else check if they can use the automation interface to add an element to a root package in their project. I can add it fine, but doesn't seem to appear in the project view.

Thanks in advance

4
Automation Interface, Add-Ins and Tools / Notifications from EA
« on: May 09, 2004, 08:04:51 pm »
Does/Can EA generate some type of Event that I can catch and process if something within EA changes? For example elements that have been deleted, a package has been removed, I would like it if EA was able to tell me that something has happened to the model and that I need to refresh my view on it.

Cheers

5
Automation Interface, Add-Ins and Tools / Re: Automation, SQL Server
« on: April 22, 2004, 03:03:29 pm »
Wow, simple, the connection string works

6
Automation Interface, Add-Ins and Tools / Automation, SQL Server
« on: April 22, 2004, 02:31:36 pm »
Is there anyway to access EA models stored in SQL Server through the Automation interface?

Thanks

7
Automation Interface, Add-Ins and Tools / Element Heirarchy
« on: April 19, 2004, 04:31:27 pm »
I am trying to add some elements in so that there will be some kind of heirarchy between the elements. E.g:

Element1
     |_____Element1.1
                      |_______Element1.1.1


I have tried do Element1.Elements.AddNew(blah, blah), and also
Element1.EmbeddedElements.AddNew(blah, blah) both to no avail.

I think the elements are being added in fine. But the project treeview doesn't show any of my children elements. I am also calling update() and refresh() as required. Any guesses as to what the problem could be?

Thanks in advance

[edit] OK, Element1.Elements.AddNew(blah, blah) creates the the new object, I call update() on it and the returned value is true, so supposedly the new element is updated and added to the database.

BUT, i call refresh and then check the size of the Elements collection it was still the same size as before the new element was added. So I think this is why the child elements are not appearing on the project tree view. Weird! Is there anything i'm doing wrong?[/edit]

Pages: [1]