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 - Martin Terreni

Pages: 1 ... 48 49 [50] 51
736
Automation Interface, Add-Ins and Tools / Re: Create addin
« on: April 22, 2008, 03:26:37 pm »
Could you give some details about the systems? and about what and how it seems to be not working?

737
Automation Interface, Add-Ins and Tools / Re: Create addin
« on: April 21, 2008, 10:25:05 pm »
I would say RTFM. Enough examples available in site and in installed code samples.

738
Yammi Yammi ;)

739
All very nice, yet I have seen other tools including the general attributes\tagged values\whatever in the properties dialog. I see no reason why it wouldn't be added also in EA. Use the same tagged values form, just in a new tab in the properties dialog.
Is it that hard or revolutionary?

740
I haven't really checked this, but maybe you should do some combination, like getting selected diagram and selected object separately from the repository.

741
No problem, I just bought it for one of my developers. I'll send you the details in a couple of days.

742
Quote
I don't think there is a way
I meant there is NO way...

743
I don't think there is a way at all to use EA dialogs from add it.
We needed to edit EA linked document and so we bought licenses for the same RTF editor EA uses.

744
Hi,
I have a tamplate diagram with all the standard swimlane colors.
other poeple have created diagrams with same name, but different colors.
Now I want to run a peace of code to aling the colors, but I keep geting an error that the memory Im trying to change is protected.
here is the code:
Code: [Select]
EA.Diagram template = Repository.GetDiagramByID(120);
            EA.Diagram tDiag;
            string msg = "";
            int i, j, k;
            textBox1.Text = " ";
            //loop for all diagrams
            for (k = 1; k < 386; k++)
            {
                //skip template diagram
                if (k == 120)
                    continue;
                try //in case no such ID
                {
                    tDiag = Repository.GetDiagramByID(k);
                    if (tDiag.DiagramGUID == null)
                        continue;
                }
                catch
                {
                    continue;//do nothing, I dont care
                }
                try
                {//loop for each swimlane in diagarm
                    for (i = 0; i < tDiag.SwimlaneDef.Swimlanes.Count; i++)
                    {//loop for each swimlane in template
                        for (j = 0; j < template.SwimlaneDef.Swimlanes.Count; j++)
                        {//are they the same swimlane?
                            if (template.SwimlaneDef.Swimlanes.Items(j).Title == tDiag.SwimlaneDef.Swimlanes.Items(i).Title)
                            {
                                msg = template.SwimlaneDef.Swimlanes.Items(j).Title + "," + tDiag.SwimlaneDef.Swimlanes.Items(i).Title + "," + tDiag.Name + "," + tDiag.SwimlaneDef.Swimlanes.Items(i).BackColor + "," + template.SwimlaneDef.Swimlanes.Items(j).BackColor + ",i=" + i + ",total:" + tDiag.SwimlaneDef.Swimlanes.Count + ",j=" + j + ",total:"+template.SwimlaneDef.Swimlanes.Count;
                                //the following statement throws error changin protected memory. I tried it also without casting
                                tDiag.SwimlaneDef.Swimlanes.Items(i).BackColor = (int)template.SwimlaneDef.Swimlanes.Items(j).BackColor;
                                textBox1.Text = textBox1.Text + msg + System.Environment.NewLine + "-----------------------------------------------------------" + System.Environment.NewLine;
                                j = template.SwimlaneDef.Swimlanes.Count;  //if found, then no need to keep on looking.                            
                            }
                        }
                    }
                }
                catch(System.Exception err)
                {
                    textBox1.Text = textBox1.Text = textBox1.Text + "(failed) " + msg + "," + err.ToString() + System.Environment.NewLine + "-----------------------------------------------------------" + System.Environment.NewLine;
                }
                

And here is some out put (I feiled to notice any indexing issue here):
Code: [Select]
Caller/User,Caller/User,Create Contact/Customer,16771561,16771561,i=0,total:3,j=0,total:32
-----------------------------------------------------------
(failed) Caller/User,Caller/User,Pre-Negotiation Provide Wireless via Call Center,0,16771561,i=0,total:6,j=0,total:32,System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at EA.SwimlaneClass.set_BackColor(Int32 pRet)
   at CS_AddinTaggedCSV.Form3.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\martinte\My Documents\Visual Studio 2005\Projects\CS_AddinTaggedCSV\CS Addin\Form3.cs:line 64
-----------------------------------------------------------
(failed) Caller/User,Caller/User,Find Caller,16771561,16771561,i=0,total:3,j=0,total:32,System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at EA.SwimlaneClass.set_BackColor(Int32 pRet)
   at CS_AddinTaggedCSV.Form3.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\martinte\My Documents\Visual Studio 2005\Projects\CS_AddinTaggedCSV\CS Addin\Form3.cs:line 64
-----------------------------------------------------------
(failed) Ordering UI,Ordering UI,Negotiation Provide Wireless via Call Center,12639424,14803425,i=1,total:9,j=7,total:32,System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at EA.SwimlaneClass.set_BackColor(Int32 pRet)
   at CS_AddinTaggedCSV.Form3.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\martinte\My Documents\Visual Studio 2005\Projects\CS_AddinTaggedCSV\CS Addin\Form3.cs:line 64
 
Notice that not all of then fail.
Thanks for any help!

745
Thanks for the help.
It probably works. I wanted to add a script to an activit invocation (action) and it worked fine.

746
Automation Interface, Add-Ins and Tools / Shape script for instances
« on: March 10, 2008, 06:20:15 pm »
Is there a way to add shape scripts to instances of stereotyped elements?

747
Can it document somthing like:
"all objects of type requirement realized by this element"
Meaning this requirements are sitting anywhere in the model, but I need them as list in document under the elements notes and only if they are realized by the spesisfic element.

748
Automation Interface, Add-Ins and Tools / Re: Adding elements
« on: March 03, 2008, 01:55:36 am »
I just ectracted it from t_objecttypes.
though I realy think it should be part of the repository API, just as stereotypes collection.

749
Automation Interface, Add-Ins and Tools / Re: Adding elements
« on: March 02, 2008, 06:25:46 pm »
Now I see the problem.
ObjectType<>Element type (though elemnt types ARE kept in t_objectTypes!!).
How can i get the list of element types in the repository?

750
Automation Interface, Add-Ins and Tools / Adding elements
« on: March 02, 2008, 06:15:08 pm »
Hi to all,
My add-in needs to create elements, and since I can't upload EAs dialog for it, I need to replicate it. the problem is that I can't find a way to filer the sterotype by the selected object type.
Although there is a string in the stereotype claiming what does it apply to, it dosn't seem to fit any type name (even trimming the "ot").
Can it be that there is a bug and the types in "AppliesTo" do not mach the ObjectType strings?

Pages: 1 ... 48 49 [50] 51