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

Pages: [1] 2 3 ... 5
I believe this is the expected behavior.

Followed the scenario.

Prerequisite for reproducing the problems
- Create a package PV1 with 3 diagrams each showing same elements.

- Clone package PV1 as new version PV2

- In PV2...
- Open cloned diagram D1 and filter to version
- Create a new element ENEW
=> PROBLEM 1: ENEW is greyed out, though this is clearly a change.

- Clone an element ECHANGED. The element is properly cloned and it is no longer greyed out.
- Open cloned diagram D2 that shows same elements as D1
=> PROBLEM 2: ECHANGED is greyed out, though it has been clearly changed.

- Create a new element ENEW  - check its version will be against filter version
- Open cloned diagram D2 - The element is still the original one not cloned so this again the filter version. you never cloned the element in this view. so it still refers to PV1 package

Hello Shegit,

I have an example model for how document script works in EA.
You can download it from this link


General Board / Re: Weird copy/paste diagram behaviour
« on: January 15, 2018, 08:44:19 pm »
Hello Boron,

I hope nizam clarified your first question
but to answer how to get a copy without duplicate. Open source diagram do ctrl + A and in target use ctrl + V

Best Regards,

I'm not sure how it doubled! You can delete the TV using script. Refer Scripting -> Element Extras Example line(194-207). Please do take a baseline before you delete

Best Regards,

General Board / Re: Running script from an specific Element
« on: January 10, 2018, 06:29:52 pm »
Hi Paolo,

Not directly via UI. We need an Addin in this place. But definitely it reduces manual effort & errors once in place.


General Board / Re: Running script from an specific Element
« on: January 10, 2018, 05:46:30 pm »
Hello Paolo,

We can use context item event to get the script from an element.

We can execute the script using Script Control Class (there are certain limitations)



General Board / Re: Running script from an specific Element
« on: January 10, 2018, 04:53:04 pm »
As geert mentioned scripts are stored in model.

but if necessary, you can store scripts in a tagged value of that element.

Best Regards,

Hello Henrik,
Not so tough as you think.

Here we are using API which is safer to handle things
To start with goto scripting tab, you will find a local scripts category here you can find many scripts to start with. For this specific case you can refer JScript Manage Attributtes and Methods example the same available in VB Script as well

Also you can refer geerts github library for more samples.


General Board / Re: Enterprise Architect - User Tips
« on: January 10, 2018, 12:56:00 am »
Posting a tip from my old community article (unpublished now because of broken links)
Differentiate incoming & outgoing connectors of an element. Select an element in a diagram (workspace) and press "L" (keyboard) to highlight. Incoming flows will be highlighted in Red and Outgoing in Green.


Yes It is a Tag Value hidden from GUI. My fault you can do it via API using this syntax

for ( var i = 0 ; i < attributes.Count ; i++ )
         var currentAttribute as EA.Attribute;
         currentAttribute = attributes.GetAt( i );

         // Delete the attribute we just added
         if ( currentAttribute.Type == "INT" )
            var AttTV as EA.Collection;
            AttTV = currentAttribute.TaggedValues;
            for ( var j = 0 ; j < AttTV.Count ; j++ )
               var currentAttTV as EA.TaggedValue;
               currentAttTV = AttTV.GetAt( j );

            //Session.Output( "To Change: " + currentAttribute.Name );


Hello Friend,

Run a script which does this tag calculations and update it. (This you have to run every time manually)
As you have mentioned based on elements on diagram. I assume elements are already created based on diagram change you need to perform this operation.
you can try EA_OnPostNewDiagramObject & EA_OnPostCloseDiagram events put your logic in this will do the things on fly you can combine your MDG with Addin as well.

Best Regards

Yes It is always good to go with API but for accessing Attribute Unsigned value I'm not sure will we be able to do it via API. To update the table you can try Repository.Execute()

you will get many sample out there in forum.


Uml Process / Re: Changing file path of imported code
« on: January 09, 2018, 12:36:48 am »

you can use this to replace file path

function updateFilePath(curElement)
   var curElement as EA.Element;
   if(curElement.Genfile != "")
      curElement.Genfile = "C:\\nabil\\code_generation\\CAN.h";
      Session.Output(curElement.Name +  " : Updated");

as an alternate

Hello Henrik,

I not sure do we able to set a default value.

But we can run  script to update column unassigned to True.

All these will be stored under t_attributetag table.

Hi Marcelino,
You can use Master & Model templates concept to acheive this.

Nabil Saleem

Pages: [1] 2 3 ... 5