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

Pages: [1]
1
General Board / Re: access sequence diagrams
« on: January 24, 2011, 11:13:53 pm »
EDIT: i found it! thank you very much!

2
General Board / Re: access sequence diagrams
« on: January 24, 2011, 10:05:10 pm »
i basically found what i am looking for.

I opened the EA-Project with MS-Access and looked through the SQL-Tables. I found almost every piece of information I need. The only thing i didn't find was the following:
In the sequence diagram i defined a message which executes an operation (function). In EA you can define the Parameter Values which shall be passed to the operation. I set the value to 0xFF, but i can't find this value anywhere in the SQL tables!

Does anyone know where i could find the parameter value for the operation which is to be executed?

3
General Board / access sequence diagrams
« on: January 24, 2011, 07:56:50 pm »
Hello!

I have a sequence diagram in my EA-Project in which i have two Classes (one Tester-Class and one Softwaremodule-Class). Now i defined, that there shall be two messages sent between those two classes.

My problem is, that i need to parse this information for another application. Is there any way to access Information like which message is sent from which class to which class with which properties over the Interop.EA.dll?

Thanks in advance!

4
Automation Interface, Add-Ins and Tools / Re: pre conditions in sql
« on: December 02, 2010, 02:04:08 am »
Alright. Thanks very much! I got that to work...

Although there is another thing which has been giving me a headache the whole day already :)

I want to list all operations, that do not have a tagged value named 'define' in them. I use the following code:

Code: [Select]
SELECT  DISTINCT t_operation.ea_guid AS CLASSGUID,
             t_operation.Name AS 'Name'
FROM    (t_operation LEFT JOIN t_operationtag ON (t_operation.OperationID = t_operationtag.ElementID))
WHERE   t_operationtag.Property <> 'define' OR t_operationtag.Property IS NULL

This works fine and shows all operations which have either no tagged value or any other tagged value other than 'define'.

My Problem now is, that as soon as the operation has more than one tagged value and one of the tagged values is 'define', then the operation gets displayed anyway because the other tagged values dont match the criteria.

So basically i want to check if there is a tagged value named [ch712]define' and if yes, the whole operation is not supposed to show up in my output at all.

Any ideas how i could do this?

Thanks

5
Automation Interface, Add-Ins and Tools / Re: pre conditions in sql
« on: December 02, 2010, 01:40:34 am »
ah!!!

thank you very much!

when i open the sql query editor in EA there is a list of all available tables. the t_operationpres is not in there. that tells me that this list is not complete.

is there a complete list of all available tables? i find the documentation from EA very poor on the sql part.

6
Automation Interface, Add-Ins and Tools / pre conditions in sql
« on: December 01, 2010, 07:59:53 pm »
hello,

i am trying to get some data out of my EA model with sql queries.

for operations you can define "pre conditions". I cant seem to find the SQL table in which these pre conditions are listed.

can anyone point me in the right direction?

thanks in advance!

7
Automation Interface, Add-Ins and Tools / Re: reading variables
« on: September 22, 2010, 07:00:22 pm »
Ok! Thank you very much!

I will give it a try!

8
Automation Interface, Add-Ins and Tools / Re: reading variables
« on: September 22, 2010, 06:23:13 pm »
That would be very good for me because I don't need to change anything either. I only have to get all attributes and operations.

Is it possible for you to post some of your code as an example? I don't really know much about SQL queries... Only the basics!

9
Automation Interface, Add-Ins and Tools / Re: reading variables
« on: September 22, 2010, 05:57:28 pm »
I just got it to work for attributes. Thanks for your help!!!. I loaded the wrong file which is VERY VERY big and takes a long time. I will try do parse functions now.

Is it normal that the communication between the .NET program and EA is so slow? I need about 2 minutes just to open the connection to the server.

10
Automation Interface, Add-Ins and Tools / Re: reading variables
« on: September 22, 2010, 05:28:20 pm »
thanks! thats what i thought after your last post...

is there a tutorial for this? because i cant seem to get it working!

11
Automation Interface, Add-Ins and Tools / Re: reading variables
« on: September 22, 2010, 05:15:56 pm »
Sorry... I just realized that I didn't make myself clear :)

In the EA project, we defined variables and functions of our code. These are (as far as i know) called attributes and operations. So this is what i want to read!

12
Automation Interface, Add-Ins and Tools / reading variables
« on: September 22, 2010, 04:24:34 pm »
Hello,

I have an Enterprise Architect project which includes many functions, variables, structs and enumerations. I would like to read those programatically in C# and generate code.

I can't find out where the variables and functions are located though. Can anyone help me out?

I tried (just as it sais in the help) walking through all the elements. I can't find the variables though...

here is my code so far:

Code: [Select]
   public partial class Form1 : Form
    {
        EA.Repository r;
        List<string> list;
        List<string> elementsList;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            list = new List<string>();
            elementsList = new List<string>();
            r = new EA.Repository();
            r.OpenFile(@"D:\EA\08-1A3811-002_SWA.EAP");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            list = new List<string>();
            elementsList = new List<string>();
            for (int i = 0; i < r.Models.Count; i++)
            {
                DumpPackage((EA.Package)r.Models.GetAt((short)i));
            }
        }

        private void DumpPackage(EA.Package package)
        {
            list.Add("Package Name: " + package.Name);
            listBox1.Items.Add("Package Name: " + package.Name);
            treeView1.Nodes.Add(package.Name);
            DumpElements(package);
            for (int i = 0; i < package.Packages.Count; i++)
            {
                DumpPackage((EA.Package)package.Packages.GetAt((short)i));
            }
        }

        private void DumpElements(EA.Package package)
        {
            for (int i = 0; i < package.Elements.Count; i++)
            {
                elementsList.Add(((EA.Element)package.Elements.GetAt((short)i)).Name);
                listBox1.Items.Add("Element: " + ((EA.Element)package.Elements.GetAt((short)i)).Name + ((EA.Element)package.Elements.GetAt((short)i)).Elements.Count);
                int index = treeView1.Nodes.Count - 1;
                treeView1.Nodes[index].Nodes.Add(((EA.Element)package.Elements.GetAt((short)i)).Name);
                //MessageBox.Show(((EA.Element)package.Elements.GetAt((short)i)).Name);
            }
        }
}

Pages: [1]