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

Pages: [1] 2
1
thx, I will try to find information into attributes tables stored in conection with this locked element

2
Hi,
I must recognized (in addin) what type of lock is set to the locked element.
Where can I find information contains LockType for locked element in EAP (usung API or SQL commands). The locks are stored in t_seclocks, but field LockType is empty for all existing locks in EAP.
Available type of lock are described in documentation:
http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/projects_and_teams/lockingpackages.html
P

4
Hi,
In EAP I have the element with defined constraints. One of this constraints has constraint.name set to "0" (zero). In my addin (c#) I find this constraint and set constraint.name to another value ("A"). Next I try to update this constraint and I have the error
DAO.QueryDef [3075]
Syntax error (comma) in query expression ...
Finaly this update is working and this changes are stored in EAP.
My problem is, how can I catch this exception in my addin code, because this is error is shown in separate window and stoped whole proces.
Code: [Select]
EA.IDualElement el = Repository.GetElementByID(<Element.Element_ID>);
foreach (EA.IDualConstraint con in el.Constraints)
                    {

                        if (con.Name == "0")
                        {
                            con.Name = "A";
                            try
                            {
                                con.Update();
                            }
                            catch (Exception ex1)
                            {
                                MessageBox.Show("My Error" + Environment.NewLine +
                                    "Exception.Message" + Environment.NewLine +
                                    ex1.Message + Environment.NewLine +
                                    "Repository.GetLastError()" + Environment.NewLine +
                                    Repository.GetLastError() + Environment.NewLine +
                                    "");
                            }
                        }

5
sorry, of course, its was only for quickly testing in EAModelSearch
tnx

6
It's works if the SQL statement is like this
"SELECT Note as Notes FROM t_object".
Without alias "as Notes" it doesn't work correctly, returned empty string.

7
tnx :) I tried it first, but... t_object doesn't contains field Notes. It is only Note, but it is empty.

8
I must write a simply select statement for select notes value sets for element, but...
where is stored this value in EAObjects?

9
Thx, You are THE BEST :) it's works.

10
I write addin (in c#). Addin adds new diagram (Activity Diagram) with same diagram objects (Actions, connectors...). Diagram Objects have set value the Effect properties. I have problem with setting visibility this parameter on diagram.
I want obtain these results as set box "Show Effect in diagram" in Properties window for diagram object (element Action).
Anybody knows, how can I set it, using API, in my addin? Where it is set in EA object structure?
thx

11
thx for all informations and help

12
Yes, of course. I used this solution, by SQLQuery, yesterday, and its works.
String str = Repository.SQLQuery("select t_object.Cardinality from t_object where t_object.ea_guid = \"" + e.ElementGUID + "\"");
But it is finality way for me. I try allways used API first.
Thx,
PS

13
Hello quwerty:)
I tried and I had the error...
Error      5      'EA.IDualElement' does not contain a definition for 'GetReferenceList' and no extension method 'GetReferenceList' accepting a first argument of type 'EA.IDualElement' could be found (are you missing a using directive or an assembly reference?)
(I must to use EA v.9.3.921)

14
It is possible to get value of Cardinality sets to the element? (In GUI: choise element and next from menu Properties->Detail->Cardinality).
Localization for this value in repository is t_object.cardinality. It is possible to get this value using API? It is not the same value as Multiplicity.
(I write addin in c#)

15
Thank you for answer.
I already reported the bug and I look forward to the support.
I changed the code to insert into t_xref and works well

Pages: [1] 2