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

Pages: 1 [2]
General Board / .NET: adding a single class from the framework.
« on: March 10, 2006, 07:34:05 am »
Every so often, I would like to add a class from the framework just to be able to show what is happening.

Is there a quick way of doing this without having to reverse engineer the whole of the System namespace?

I have done this once and found it just created a lot of noise which I don't want. I deleted most of the classes I didn't use. Now that I need one of those classes again, I now need to reverse engineer the whole system namespace again just to get the one class.

Would it be possible to reverse engineer the framework classes into a seperate area/ project and then only bring in the ones I want to actally use?

General Board / Generation of Associations as a Property
« on: January 19, 2006, 01:57:02 am »
When I define an Association and define a target Role, I can set it to private or public.

What I really want to be able to do is to set it to private and automatically generate a Property for this field.

Further to this, it would be able to be able to optionally set the property to only have a Setter. The reason for this is that I am creating a 0.* association and I want the collection class to be a read only property.

Can anyone give me some pointers as to how to best acheive this?

Many thanks

General Board / Generation of Association Classes
« on: January 19, 2006, 01:10:30 am »
I am having trouble getting EA to generate the referenced/linked attributes and have them set as properties for an association class.

What exactly do I need to set to get this working automatically?

General Board / Round Trip Engineering: Setting project location
« on: April 28, 2005, 07:05:18 am »
I have a stack of C# code on my machine and I have a new EA model, created by importing the XMI from another tool.

So, I now want to start synchronising the model and code. So how do I set the path for the source code for a package or class, so that synchronisation works?

I have hunted through the documentation and the only thing I can find is that EA stores the location of code when it generates it. That is all!

SO, how do I configure this option?



General Board / Help setting synchronisation paths
« on: December 09, 2003, 05:42:27 am »
During a project, we totally changed the namespace and directory structure to match. However, when I try to synch the model with the code, EA looks for the original path. Look as hard as a might I cannot find a way to change the path for a packages source code.

Could someone please help  and tell me how I can do this.



I have created a model in EA and generated the code.  The classes are all linked to the output code file and round trip engineering was working fine. My Package structure mirrors the namespace structure... Each package will more or less equate to a VS project.

I have now installed VS Integration so that I can see the model from within VS2005. Following the instructions, I have connected a package to the relevant project.

Now, when I come to Merge, EA/MDG recreates the namespace structure under my package.. not expected behaviour and it does not seem to be configurable! ???

I just want it to link the classes in my package to those in the project.

How can this be done?

Automation Interface, Add-Ins and Tools / MDG Int. connect to repository
« on: November 15, 2006, 05:48:47 am »
I have moved my model into a SQL Server repository. I am now trying to get the MDG VS2005 integration working.

From VS2005, when I try to attach to a model and when I choose the Connect to a repository option, I am only given the option to open an EA model or configuration file.. ???.EAP

I am presuming this is a special config file defining how to connect to a repository, but I cannot for the life of me find out how to do this! ???

Can someone please tell me? An then could the documentation be update please!

I have this installed but there is no documentation anywhere telling me how to use this!

So, could someone please tell me how to get at this puppy!


I was looking at the marvellous .NET Class Library Exporter for EA kindly provided by Ian Hunter.

Having a few seconds spare time, I tried it out and found that it was not complete in that the XML generation was commented out and incomplete.

I was looking at extending the work he did. Now, my questions are:
  • I have found a method on the Project class to ExportPackageXMI. However, the parameters are not fully documented. For instance:
  • What are the allowable values for XMIType?
  • Also, the parameters are Long, yet the values given are True. So how are you mapping True to a Long? Is it 1 for true and 0 for false?
  • Also, method is supposed to return a string. I was expecting this to be the XML string we are exporting, but this is always blank. however
  • Finally, the exporter uses Repository.ShowWindow(int) What value should be passed in to ensure that the window is not shown?

If I can get this working, I may well use this to create an addin which can be used to import any .NET assembly into an EA diagram.

Automation Interface, Add-Ins and Tools / COM Error not being thrown
« on: November 03, 2003, 05:11:30 am »
As you may well be aware, I am in the last stages of completing an Add-In for importing .NET assemblies.

This basically trawls through the assemblies and extracts namespaces and creates packages accordingly.

As each namespace is encountered, I test to see if the package already exists using the following code:
Code: [Select]

     testPackage = package.Packages.GetByName(packageName) as EA.Package;
catch (System.Runtime.InteropServices.COMException cex)
   //Package does not exist, so create new one
   newPackage = package.Packages.AddNew(packageName, "") as EA.Package;


// etc.......      
catch (Exception ex)
   //Other Error Handling ....

I am sure this worked earlier, maybe under V3.5, but now, I keep getting a message box with the following message:

Syntax error(missing operator) in query expression 'Name=myNameSpace' AND Package_ID in ()'

Does anyone have an idea as to what is happening? Am I dong something wrong? Otherwise, does anyone else have any ideas as to how to check for the pre-existence of a package?

Pages: 1 [2]