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 - duncan.greenyer

Pages: [1] 2
1
Does anyone know how to programmatically create a Diagram Frame or Diagram Reference. If I create a UMLDiagram element using package.elements.addnew("test", "UMLDiagram") it does not appear in my package + I have no idea how to get it to reference the diagram that it is supposed to represent. The documentation also doesn't seem to reference how it can be achieved. Has anyone got any ideas?

2
General Board / Re: SVG export
« on: May 11, 2023, 05:52:47 pm »
I would note that not everything is exported properly using SVG, custom tables for example don't export at all. Also the SVG that is exported goes not use grouping properly so do not edit nicely in tools like inkscape.

3
Automation Interface, Add-Ins and Tools / Re: Web Sockets
« on: April 11, 2023, 06:32:18 pm »
Ignore this post, I have solved my issue.

4
General Board / Re: Stream Deck
« on: April 11, 2023, 06:31:20 pm »
Ignore this post, I have created my own Stream Deck plugin that uses Node.js, as opposed to C++ or Objective-C, from here I can import the winax library to enable COM Automation of EA. Using this I can add Javascript to my Plugins button to control EA through the object model. Hit a button on Stream Deck set tagged values on an element, that sort of thing.

5
Automation Interface, Add-Ins and Tools / Re: Web Sockets
« on: April 08, 2023, 09:04:41 pm »
Thanks for the response however, new WebSocket does not work, it appears that this library has not been included or the version of Spider Monkey is too old. I did look for a COM/ActiveX version but this is messy and a security flaw. I cannot use V8 require or module imports so there seems no way to invoke a web socket which is a shame.

6
Automation Interface, Add-Ins and Tools / Web Sockets
« on: April 07, 2023, 08:28:25 pm »
Does anyone know if its possible to create a Web Socket in EA's javascript engine or even a basic network socket?

7
Automation Interface, Add-Ins and Tools / Re: Neo4j and Sparx EA
« on: April 07, 2023, 08:23:30 pm »
I was thinking that you could look beyond the database and see that regardless of how EA stores its data conceptually EA, as a tool, IS a graph and therefore could be queried as such. But sounds like you have a solution, I just bought the cypher book from packt so might have a go at seeing if I can write a cypher query parser in javascript on EA.

8
General Board / Stream Deck
« on: April 06, 2023, 07:57:05 pm »
I now have a Stream Deck and it works great with EA, but I do have a couple of questions:

1. Does anybody know of any existing Stream Deck profiles for use with EA?
2. Certain menu options do not have keyboard shortcuts such as "insert related elements", now for some it is possible to add keyboard shortcuts via Preferences -> Toolbars -> Keyboard but "insert related elements" does not appear as does "Line Style -> Tree Style Vertical", does anyone know how to add keyboard shortcuts for these?

Thanks.

9
Automation Interface, Add-Ins and Tools / Re: Neo4j and Sparx EA
« on: April 05, 2023, 06:12:32 pm »
Why move the data at all? Why not create a cypher query engine in javascript that can use the ea object model to traverse the links then you could use graph querying directly in the tool.

10
I don't think its going to take quantum computing just a better Javascript engine like V8.

11
Well it would be Javascript but the level of control would far exceed ShapeScript as we could not only have If then else but loops etc... or event make other calls when elements are about to be rendered

12
I would use the same technique as in a browser:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
    <script>//<![CDATA[
        …code…
    //]]>
    </script>
</svg>


13
Cannot script SVG? I assume you mean there is not exposed object model in EA? Obviously SVG by its very nature is scriptable. You take the SVG parse it into an object model which then gives you the ability to call methods on those objects, the same way you can script SVG in a browser, just add the script to the SVG event.

14
The problem is, if you use decoration to add a rectangle over the icon the decoration is 16x16 and the ArchiMate icons are larger and therefore are not completely covered. I have opted to create a new decoration icon with NW orientation so that both are displayed. Since its a specialization of ArchiMate it shouldn't matter butI hope one day we can dump shape script and move to SVG for better control.

15
Its strange but redefining the decoration does not seem to prevent the original decoration from being rendered. This means I can still see the original decoration underneath.

Pages: [1] 2