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

Pages: [1]
1
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]

 

2
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

3
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

4
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

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