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

Pages: [1]
1
General Board / Re: Automatically layout diagram API
« on: June 24, 2013, 11:16:43 pm »
Thanks Geert :)

It is in the project interface.

projectEA.LayoutDiagram(arg0, arg1);

do you know if there is somewhere a detailed description of all the functions in the API, because on the sparx website only some of them are explained, but for others there is no explanation of the way they work or the input parameters...

2
General Board / Automatically layout diagram API
« on: June 21, 2013, 08:51:10 pm »
Hi,

I know that there is a way to position the elements in a diagram manually by giving coordinates through the API, but is there a way to call the automatic positioning option in EA through the API? Just add the elements to the diagram, and then call some function?

Thanks

3
General Board / Re: Add element to collection
« on: May 07, 2013, 09:41:34 pm »
Thanks a lot for the info everyone :)

Now I can add new classes and requirements to the packages....just need to figure out how to add them to the diagram also...  

About the custom EA Elements, I see now that they all must have those basic properties.... but is it possible just to change the way the properties screen (tab) looks like for them..for example.. just to display name and type (and maybe some additional property, if it's possible to display here, and not in the tagged values tab) ?

4
General Board / Add element to collection
« on: May 07, 2013, 05:54:17 pm »
Hi,

I have few short questions regarding Enterprise architect.

1. My question is regarding the automation interface. When following the instructions provided on this page: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/collection.htm in order to add a new element to the collection ( and the .eap file) it does not add the element. I can get data from the elements, modify and even delete them, but adding a new element does not work?

> Call AddNew to add a new item.
> Modify the item as required.
> Call Update on the item to save it to the database.
> Call Refresh on the collection to include it in the current set.

java example:

elements is a collection of all the elements in the model...

      org.sparx.Element elementEa = elements.AddNew("Requirement", "non-functional");
      elementEa.Update();          
      elements.Refresh();
        

2. With the api is it possible to change the id or guid of an element since there are no methods specified in org.sparx for that?


3. One last thing... Is it possible to create a custom element in EA, for example a requirement which will not have the standard properties like difficulty, priority etc.. , but will have others? (normal properties, not tagged values)


Thank you very much,
Alek         

5
Thanks for the advice qwerty and rothnic. By setting the CSV MODE =2 for the style for each individual connector, I can set them to auto-route style. However the lines still cross other elements.

What I was looking for was a way to call this what is displayed in the link, but from the automation interface.. so i'ts just clicking a button to layout the diagram...

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/layout_diagrams.html

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/auto_route_layout.html

6
Yes, I have the book. I want to call auto route on all connectors. I'm first adding all the elements to the diagram, and then i call

project.LayoutDiagram(diagramEA.GetDiagramGUID(), n)

from the projectInterface so they are displayed in hierarchical order similar to the Diagraph option for layout, so after that because some connectors are displayed over other elements, I'm trying to call the Auto route (which is one of the options for layout of a diagram...like Circle, Diagraph or Box...)

7
Hi,


After adding elements to a diagram through the automation interface (which are connected with nesting connectors), by using

project.LayoutDiagram(diagramEA.GetDiagramGUID(), n)

 I can layout the diagram in hierarchical order. The value for n doesn't seem to influence the layout.

However I cannot find a way to call the auto route for the connectors through the automation interface. Is that possible?

And one more question... I know that there is a problem with the port positioning (which doesn't work), so I'm using sql updates for that, but is it somehow possible to call auto route for the connectors connected to ports?

Thanks,

8
Automation Interface, Add-Ins and Tools / Re: Setting status colors
« on: September 23, 2013, 07:21:47 pm »
Hi,


sql = "UPDATE t_genopt SET [Option]='sName=On-going,sColor=128;sName=Rejected,sColor=32768;sName=Under Review,sColor=12639424' WHERE AppliesTo='Status'";


Now it works fine. Thanks for the help :)

9
Automation Interface, Add-Ins and Tools / Setting status colors
« on: September 23, 2013, 03:52:49 pm »
Hi,

I am trying to set the status colors through the automation interface. Since there are no methods for it, I'm using a sql querry to add a new status, in the t_statustypes table..which works perfectly fine.
However I'm unable to set the colors in the t_genopt table...  

sql = "UPDATE t_genopt SET Option='sName=On-going,sColor=128;sName=Rejected,sColor=32768;sName=Under Review,sColor=12639424;', AppliesTo='Status' WHERE AppliesTo='Status'";
               repositoryEA.Execute(sql);

Is the problem maybe that the Option field in     t_genopt is type MEMO, so it should be accessed differently?

Thank you,

10
Automation Interface, Add-Ins and Tools / Status types
« on: July 19, 2013, 04:22:31 pm »
Hi,

Is there a way to change the list of status types through the automation interface?

 Something similar to doing Settings -> Project types -> General types -> Status,  but to be able to change and add status types and set the colors?


Thanks,
Alek

Pages: [1]