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

Pages: [1]
1
General Board / Generate sg-files for all diagrams
« on: September 04, 2020, 04:19:37 pm »
Hello

I use EA 15.1. I want to export all diagrams to svg-files. The file name of a diagram should be the GUID.
The files should be used in another web-based application.
Unfortunately EA seems to support only "windows" emf vector format.
There is a svg plugin but I have no idea how to automate it to export around 1500 diagrams. The next problem is that the web-bases application is not able to print those correct.

At the moment I use the following solution:
A little VB Script loops through the project and creates a PDF of every diagram.
After that a batch-file uses inkscape to convert to PDF to SVG.

Before I used EA 13. With the older version everything was fine. With EA 15 something happened to the fonts. When I use the solution above single letters are missing in labels of the created SVG (They are still in the PDF).
inkscape seems not able the files correct anymore. When I configure inkscape to use the external "poppler" converter instead of the standard converter ths labes are fine again.
Thew problem with this solution is that the print tool of the web based application isn't able to handle the SVGs anymore. All labes are moved into a single line at the top of the diagram.

I also tried to export diagrams to emf and convert them the svg using inkscape. Inkscape isn't able to handle the emf files correct. Only labels are on the page. Symbol, lines, etc. have an offset, they are not placed at the correct postion. So far I only found paint which is able to handle the file correct.


Has anybody a solution how to export all diagrams into working and correct svg-files?

Thank you very much.

2
Hello

I've just updated from EA 13 to 15. Now all my diagrams are broken.
Before the label of a port contained just the name of it. Now it also contains the property type.
I found out that I can change this When unchecking (Left klick diargam area) -> Properties -> Elements -> Element Appearance -> Show Property Type.

I didn't find any solution to reset the default setting to the old behavior.
I have over 1000 diagrams. I don't want to change them manually.

Therefore my idea to use a script to modify this setting.
I took a look at the API and didn't find anthing usefull in diagramm class.

Can anybody give me a hint how to change this?

Thank you very much.

3
General Board / Port Label - Remove Property Type
« on: July 23, 2020, 11:18:22 pm »
Hello

I have some EA 13.2 component diagrams.
The components have ports.
For every port a property type is specified.
In EA 13.2 only the name of the port is shown in the label.

I've done an upgrade to 15.1
The the label contains both, port name and property type.

Is there a global setting to hide the proprty type again?

I didn't find it.

Thank you very much.

//Edit:
When I uncheck "Show Property Type" in diagram settings I get the rendering I want.
Is there a global setting to recover the old behavior?

4
Hello Geert

Thank you very much for your fast reply.
I'm a microcontroller programmer. I know C and assembler but don't much about windows programming :)
I have no clue about COM etc.
Sounds like not many have thought about using add-ons in scripts yet?

I have to think about it.
The SVG add-on contains a visual studio example how to do mass convert. Maybe it's easier to modify.

5
Hello

I want to export all diagrams of a project as SVG. I found a VBA script which uses the function projectInterface.SaveDiagramImageToFile.
Unfortunately EA can't export directly to SVG. My approach was to export as emf and use inkscape to convert the emf files to svg.
That worked for some diagrams but not for all. Inkscape is not able to handle everything correct, some images are broken.

I found an add-on which can be used to export directly into SVG: https://community.sparxsystems.com/community-resources/706-svg-diagram-export-add-in This add-on is able to export diagrams which have been broken before.

Now my question is:
Can anybody tell me how to use an add-on in a VBA script?

I have no clue how to proceed.

Thank you very much

Pages: [1]