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

Pages: [1] 2
1
Hello,

Sadly I will answer yes at your two question...  :-/
In a nutshell, I don't know how to write my script to iterate through all the elements of my package (including composite diagrams).

I tried to iterate the Package element's with
Code: [Select]
Repository.GetTreeSelectedPackage()
But It wasn't successful.

2
Hello UML guru out there,

I'm struggling to create my vbs script to go through all the elements of my diagram and the elements of the composite diagrams.

My idea is to applied a scrip on Package as the one in the picture bellow.
The script should check all the elements of all the diagrams.



I've managed to checks the elements of each diagram independently, but not for the composite diagram

Do you have an idea how to do it ?

Thanks in advance

3
What was my opinion too. But I would like to avoid the use of global variable...

Thanks for the fast answer !  

4
hello !

I'm currently struggling with the EA Post-New Events and EA Pre-New Event.
In a c# Add-in, I'm checking if the right attribute is apply on the right element, using theirs stereotypes.

I try to use the function EA_OnPostNewAttribute which work correctly to do some tests and modifications on the attributes proprieties.
But I didn't manage to "not apply" the attribute if I don't want to (returning false in that case). Which seems normal as the Attribute is already created...
So I try to erase this attribute, but I did not succeed.  :(
-> Which method should I use to erase an attribute knowing is ID and is parentID ?

As it didn't work with that function, I try to use the EA_OnPreNewAttribute. It seems perfect in the first case, as it allows to add or not add the attribute before it is created ! But I didn't manage to change the proprieties, so it became useless...
In the function it is possible to change the attributes proprieties, but the changes are not took into account then the attribute is created.
-> is there a way to change the attributes proprieties using this function ?


Any help is welcome !  :)

5
Automation Interface, Add-Ins and Tools / Re: Get the New Element
« on: August 05, 2014, 10:55:24 pm »
I got  something to work with using  
Code: [Select]
int ElementID = int.Parse(info.Get("ElementID").Value.ToString());
I'm using EA version: 11.0.1103
It is strange...

6
Automation Interface, Add-Ins and Tools / Re: Get the New Element
« on: August 05, 2014, 07:51:27 pm »
Quote
Hello,

I'm also facing problem getting the elementID.
I have try to get it as proposed :
Code: [Select]
int ElementID = int.Parse(info.Get("ID").Value.ToString());
But I'm always getting an error "index is out of range".
It seems a normal error specified in the manual for the "EventProperties Methods".
Whatever I'm passing as objectIndex (e.g. 1;0;"ID"...) I'm always getting this error.

Could you lighten this objectIndex question ?
Thanks !

When I'm using :
Code: [Select]
MessageBox.Show(info.GetType().ToString())
I'm getting "System.__ComObject" as output value.
Is it due to a missing library  or Reference ?

7
Automation Interface, Add-Ins and Tools / Re: Get the New Element
« on: August 05, 2014, 05:53:11 pm »
Hello,

I'm also facing problem getting the elementID.
I have try to get it as proposed :
Code: [Select]
int ElementID = int.Parse(info.Get("ID").Value.ToString());
But I'm always getting an error "index is out of range".
It seems a normal error specified in the manual for the "EventProperties Methods".
Whatever I'm passing as objectIndex (e.g. 1;0;"ID"...) I'm always getting this error.

Could you lighten this objectIndex question ?
Thanks !

8
And is there a way to clear the stereotype field when I drop the element on the diagram ?
Maybe with the use of Addin ?

9
hello and thanks for your comments !

I've decided to implement every component I need with theirs specified Tagged values.

In the same subject I have a question regarding the created elements from my MDG technology.
Then I drag elements onto my diagram, the "stereotype" field contains the name of the Stereotype element I created to build my toolbox.

I would like to get ride of this, and leave the "stereotype" field empty.
But I don't if there is a way to do it ? As EA needs Profile element to extend metaclass...

Any hints on this are welcome !!  ;)

10
Thank you for your respond, it's a clever of doing it !
But it raise one problem. I would like to add Tagged Values to Attributes, and Class, etc.

Is there a way to do a generic Tagged value that can be applied "any" elements ?
E.g. If I add a tagged Value"ON" to a Class element manually I don't need to add an attribute which contains the TV "ON".
But I would also like to add a TV "ON" to an attribute (not specifically from that Class).
With a generic TV I could narrow the toolbox size !

Can you see a way to do it ?
Using an Addin is the only solution ?

Thanks !

11
Hello UML gurus !

I would like to know if there is a way to make TaggedValues available as drag and drop element from a toolbox menu ?

In the toolbox i'm working on, I can manage to make Attribute available as drag on drop elements. But somehow I don't find a way to do it with the tagged values.

Is there a way to describe TaggedValues as element when making an MDG technology ?

(I try to work with the TaggedValue connector, but it is misleading)

Thank you for your help,
I really appreciate it !

12
Hello,

On EA there is an option allowing the user to release his locks in one time.
as shown on the picture below: (Manage My Locks, just before the highlighted tab)



I have developed an  C# Add in, and I would like to know if there is a way to release the user locks when the User disconnect from EA, using the  EA_Disconnect function ?

Thanks in Advance !

13
Thank you !
It is now working

Best regards

14
Hello everyone,

I struggling on this for a few days.
Using the Code template editor, I've seen that its possible to call an add-in function.

I have already made my personal add-in in C#, and it is correctly installed.

My function is just returning a string (to check if it was working...)
Code: [Select]
public string invert_string(EA.Repository ElementfromEA, String string_to_invert)
        {
            string_to_invert = "inside";
            return string_to_invert;
        }

In EA I'm calling it like this:
$tmp = %EXEC_ADD_IN("my_addin", "invert_string", "")%

Then generating the code, I got an error:  invert_string: Invalid Parameter(s)

Can you give me an hint on how to make it work ?
Or an example ?

Best regards

15
Brilliant ! Thank you

Pages: [1] 2