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.

Topics - aljazjelen

Pages: [1]
General Board / GetCurrentDiagram() returns null
« on: March 02, 2022, 04:03:39 am »
Hi to whoever reading this :)

I have a following code:

Code: [Select]

// Main
var rep as EA.Repository;
rep = Repository;

var diag as EA.Diagram;

diag = rep.GetCurrentDiagram();

if (diag != null){

I cannot get the "GetCurrentDiagram()" function returning anything. It always returns null (the if statement above in the code is skipped).

Anyone knows why?

Additional info:
EA v13
Selected diagram in tree
clicked on the diagram in the viewport

General Board / Composite Diagrams - Reuse Ports
« on: January 11, 2022, 08:37:56 pm »
Hi everyone,

The problem I have can be trivial. Maybe its not even solvable. In any case, any help&tips are appreciated! :)

I have a diagram, where I show an overview of elements. Those elements have ports. Now I would like to create a child diagram, reuse the ports from the parent element and model the "interior" of the parent element. For example to show what is happening inside.
I modelled in such a way, as shown in pictures below:

Then I would like to use "compartment visibility feature" (or anyother proposal) to show the "Interior" of the child diagram on the initial/diagram. See below:

However, when I do that, the ports are shown twice, eventho the port is defined only once.

Is there a way, to show interrior of the element (so to show child diagram) and reuse the ports from the parent?

I hope my question was clear :)

General Board / Different variants of same Activity
« on: July 21, 2021, 01:29:13 am »
Hi everyone,

Basically I am stuck on how to properly model "variant handling" in the terms of one functionality being implemented in several different ways, where the elements (needed to implement the function) do not affect the meaning of the function itself. Enough talking, picture attached :)

  • Firstly, my thought would be to model elements like "GetData", "ProcessData", "React" as actions? That would however inherently mean to model myFunction (of each variant) as an Activity. Would you suggest otherwise?
  • Secondly, my idea is to have a generic function structures. As you see, both variants have same structure, however the implementation (realization) differs. Is there any proper way to model a function once and then reuse its structure completely? For example to model "myFunction" once and then create "variants", to which I could allocate elements which are needed for realization.
  • Another point, as seen in example the same Component is implementing "GetData" of variant 1 and variant 2. This is however not the case for other actions. My end-goal is to have an SQL querry which would return all dependencies if I use specific component or not.

Any help would be appreciated! :)

Thank you!

General Board / ID of current diagram
« on: July 09, 2021, 10:52:35 pm »
Hi everyone,

I would like to use a "Model View" object where you can write an sql query to show the results. With it, I want to show a content of each diagram (currently selected) and their dependencies.
But to do it properly, I would need to somehow find the ID of the diagram, which is currently being viewed (not neccessarly selected on the tree!).

Can someone help me with SQL, to somehow:
  • query through diagrams but only select the one which is currently in scope
  • check all elements of type "Class" and return their dependencies

I am quite new to this, so if you have any additional learning material, I would appreciate it!

Regards :)

General Board / Tagged values - SQL Query
« on: March 11, 2021, 12:24:58 am »
Hi everyone,

I have an sql querry below:
Code: [Select]
select pkg.Name as [Package Name] , parent.Name as [Parent Name] , o.Name as [Name], o.Status as [Status]
FROM ((t_object o
inner join t_package pkg on pkg.Package_ID = o.Package_ID)
left join t_object parent on parent.Object_ID = o.ParentID)
where o.Package_ID IN (#Branch#)
and o.Object_Type = 'Class'

which returns all classes, their status and parent name. Just as expected.

What if I would want to return also a value of specific tag?

So as I am really not so confident with SQL, I tried searching on the forums and found something like:
Code: [Select]
select t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, tag1.[Value], tag2.[Value]
from t_object, t_objectproperties tag1, t_objectproperties tag2
where t_object.Object_ID = tag1.Object_ID
and t_object.Object_ID = tag2.Object_ID
and tag1.[Property] = 'tag1'
and tag2.[Property] = 'tag2'

However I am having problems merging the 2 codes together (obvious problem, since I am not dealing with SQL on daily basis).

I tried something like:
Code: [Select]
select pkg.Name as [Package Name] , parent.Name as [Parent Name] , o.Name as [Name], o.Status as [Status], tag1.[Value]
FROM ((t_object o, t_objectproperties tag1
inner join t_package pkg on pkg.Package_ID = o.Package_ID)
left join t_object parent on parent.Object_ID = o.ParentID)
where o.Package_ID IN (#Branch#)
and o.Object_Type = 'Class'
and tag1.[Property] = 'Level'

But it yields a problem. I am not entirely sure if I understand the Inner join, left Join etc... so I assume I made a mistake over there.

Anyone could help me out?


General Board / Missing MDG Technology
« on: January 21, 2021, 04:56:14 am »
Hi everyone,

We are having an issue with MDG technology packages.

Long story short, we created a custom package which would help us modeling. One of our colleague imported the MDG a bit differently than everyone else, somehow the MDG package on his computer resides on %appdata%.

Now here comes the issue. He started modelling with this setup and now no-one except him can open his models. We all receive the message: "Access to this model requires the following technologies which are not available ...".

Has anyone ever had similar issues? I guess we need to "import the MDG into his EA correctly" and then break the link of the previous version.

Thanks for support!

General Board / SQL Querry - Get Parent Name
« on: January 13, 2021, 06:32:32 pm »
Hi everyone, hope you are doing well.

For some of you, the topic might be very simple and straightforward.

So I have made a querry which returns a list of all elements of type "Signal" in a selected package. Next step would be to obtain a name of a parent of an object "o" (similar to .getElementbyId() and then searching for a name in jscript).

Code: [Select]
select pkg.Name as "Package Name" , o.Name as "Name", o.Status as "Status", o.ParentID as "Parent ID", o.Object_ID as "Object ID", pkg.Package_ID as "Pkg Package_ID"
FROM t_object o, t_package pkg
where pkg.Package_ID IN (#Branch#) AND o.package_ID = pkg.Package_ID and o.Object_Type = "Signal"

However I am stuck at how to select a name of a parent, knowing the parent id?. Could anyone point me in the direction? Is this even possible with simply SQL querries in Scratchpad?

Thanks for your support!

Best regards

Hi everyone,

First I would like to say thank you for accepting me in the community ;)
So, I am not an expert on EA/databases, however I can script with python quite well.

Recently I made a model, where classes are connected via information flow signals. Each signal has one or many names (Information Items Conveyed...).
Now, since the model is getting more and more complex, I would like to track the signal connection/usage between diagrams.
I figured out, one way could be that I export XMI and run a python script to look for signal names and obtain "target" and "sources" and save everything externally (in a CSV for example).
However... I am pretty sure there is better way, something with SQL querries?

Is there such a simple way?


Pages: [1]