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

Pages: [1] 2 3
1
Suggestions and Requests / Deleting object in the Model using keyboard
« on: August 09, 2007, 12:33:38 am »
I feel pain when deleting many objects from EA model, because I should use right-click, and choose 'delete' from long  list on the menu, every time I want to delete.

How if EA provide an ability to delete an object by pressing 'Delete' key on keyboard, and delete many element just in one time (like SHIFT + left-click to select more than one object, and press 'delete')?

Thanks

2
General Board / MDG standalone?
« on: August 11, 2008, 08:06:57 pm »
Hi all,

I have asked researching for MDG standalone. I'm not sure about MDG standalone. I have searched for MDG technology, and I think it's only MDG add in.
Does anyone know about MDG standalone and help me?

Cheers

3
Bugs and Issues / Re: Recursive method inside foreach failed
« on: November 03, 2008, 09:49:23 pm »
Of course not infinite loop. I have added some codes to avoid that. I only need the connector that comes out from current element for recursive, NOT all connector.

I think, it's not important to write down my code here, coz the actual problem is why recursive method works inside "for" loop but not inside "foreach" loop on EA collection.

If it's infinite loop, how come it works on debug mode? and also in debug build?
And another people also has the same problem with me (as I stated the link in previous post), and the also the exactly same solution??

And again, if it's infinite loop, it would be also infinite loop on "for", not only on "foreach".

4
Bugs and Issues / Recursive method inside foreach failed
« on: October 31, 2008, 05:14:59 pm »
Hi,

I'm creating an add-in for EA and I found a weird symptom.
I have foreach loop with recursive method inside. This code made the EA crash, each time it is executed (Error Report from Microsoft will pop up, letting me choose whether  want to send the error). This case only happen if  I make a build in Release mode and install it to my computer (and other computer too).

BUT, if I create the build with Debug mode. The code runs successfully.

After I change "foreach" loop into "for" loop, the release version build works fine.

I was thinking that it might be an .Net's bug on looping through collection. But I have tested recursive method inside "foreach" with another collection other than EA collection (i.e. Directory.GetDirectories()), it runs successfully.

So I begin to think that it might be an EA collection's bug. I'm not sure about this, but I think it's good to let the other know to avoid the same problem, coz it is really hard to find where the error is and tooks me 2 weeks to solve the problem.
Here is the link who has the same problem as me.

http://social.msdn.microsoft.com/Forums/en-US/clr/thread/9a4e8bbb-efbd-4a90-9549-4e1795198800/

Here is my code before :

Code: [Select]
private void iterate(EA.Element element, XmlSchema schema, bool isRoot)
{
    ............
    foreach (EA.Connector con in element.Connectors)
    {
        if (con.Type.ToString() == EA_Element.Aggregation.ToString() &&
            con.Stereotype.ToString() == CCTS_Types.ASBIE.ToString())
        {
            .........
            iterate(client, schema, false);
        }
    }
}  


After :

Code: [Select]
private void iterate(EA.Element element, XmlSchema schema, bool isRoot)
{
    .........
    for (short a = 0; a < element.Connectors.Count; a++)
    {
        EA.Connector con = (EA.Connector)element.Connectors.GetAt(a);
        if (con.Type.ToString() == EA_Element.Aggregation.ToString() &&
            con.Stereotype.ToString() == CCTS_Types.ASBIE.ToString())
        {
            .........
            iterate(client, schema, false);
        }
    }
}  

Almost forget to mention, I'm using C# with .Net 2005 and Win XP sp 2.
This error occurs on version 7.0 (i forget which build) and version 7.1 (build 832 and 833) - I tested on these version, there might be a chance in other version.

Thanks in advance.

5
Hi Geert,

It still throws the same error.. :(
But if I re-open the project, the package for both code above is created.

Cheers.

6
Automation Interface, Add-Ins and Tools / Failed creating new package
« on: August 25, 2009, 04:03:30 pm »
Hi all,

I'm wondering why simple code below always gives me error
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt"

Code: [Select]
EA.Package newpkg = (EA.Package)pkg.Packages.AddNew("nuPkg", "");
newpkg.Update();

This is the way when creating new element or attribute, but it doesn't work on package. Anyone knows why?
Thanks :)

7
Nobody can help me?? EA support team??

8
Hi all,

EA provides us capability to know which element is transformed from which element and we can see it from Hierarchy window (View -
Hierarchy) by clicking "Dependencies" relationship on the top of the window.
I try to visualise what I see in Hierarchy window:

- ElementA
  - transformed from
    + ElementB

I have tried to find where this information is saved in EA repository, but I still can't find it.
How can I programatically know that ElementA is transformed from ElementB? which properties should I read?


Cheers.

PS: Maybe my wording above is not good enough. I give screencapture that it could help more what I meant.

What I want to know is : How to find element that
<<XSDcomplexype>>EmployeeDeductionPlan
is transformed from, programatically.
Thanks.

9
Hi Neo..
Perfect..!!  ;D
I guess the "Parent=string" is for setting the type of XSDSimpleType..
Thank you very much for your help !! :)


== Finally I got the answer ==
Kristina

10
Unfortunately, your suggestion doesn't work.
- I've tried to Update() the new element before setting stereoype.  
- Ok, the Refresh() method looks odd, I've removed it.
- Both Update() method were successful, it returned true.
But the error symptom is still the same..

Code: [Select]
EA.Element newElement = (EA.Element)this.selectedPackage.Elements.AddNew("myElement4", "Class");
bool x = newElement.Update();
newElement.Stereotype = "XSDSimpleType";
newElement.Type = "string";
bool y = newElement.Update();

Unfortunately again, I can't find any documentation on EA Help related to setting XSDSimpleType stereotype on an element.

11
Hi all,

I created an element with stereotype XSDSimpleType with code below:

Code: [Select]
EA.Element newElement = (EA.Element)this.selectedPackage.Elements.AddNew("myElement3", "Class");
newElement.Stereotype = "XSDSimpleType";
newElement.Type = "string";
newElement.Update();
newElement.Refresh();
 

The code ran successfully and in project browser it showed only the name of element (without stereotype before the name).
when I double-clicked on the newly created element, element's name disappear and then it showed only the stereotype <<XSDSimpleType>> and no property dialog pops up.
And the other weird thing is, when I closed the project, and then opened it again, the element disapper. But by using code, I know the element is there but don't show up.

I have no idea what the problem is. When creating element which is NOT "XSDSimpleType" stereotyped, the code and the result will be ok.

Anyone can help me to figure out what is wrong? or did I miss something in the code?


Cheers,
Kristina

12
Hi all,

Is there any build in searching function in EA that enable us to search for particular stereotype from Add In?
I hope can find this kind of feature, cos searching throughout the model recursively is so time consuming, it takes so long to finish searching.
FYI, I'm using C#.

Cheers.

13
Automation Interface, Add-Ins and Tools / Deploy An MDG Technology
« on: August 13, 2008, 06:44:16 pm »
Hi folks,

I want to deploy MDG from an Add In. I read that "EA_OnInitializeTechnologies" function is used for deploy MDG from Add-in, but after reading EA Help n trial n error on my add-ins, I still can't load my MDG into EA. I'm not sure where to put this function in order EA  execute it on start up since there is not enough information for me on EA help.

Please help me by giving a sample...
Thanks.

14
Hi Aaron,

Thanks for you tips. It's working now  :D

Cheers

15
Sorry, I meant in the Tagged Value Window not in Project Browser.
Yes, I'm sure have checked it on the Tagged Value Window and there is nothing.

I have successfully added tagged value for an Element. But, not for the attribute.

Pages: [1] 2 3