Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Can I start yEd with a filename parameter?

0 votes
in Help by (3.4k points)
Anybody got any idea on how to do this on Fedora Linux ?
yEd <file>
On Fedora: Just append %U to the Exec line in ~/.local/share/applications/yEd\ Graph\ Editor-0.desktop, then yEd appears in the nautilus context menu ("Open With => Other Application => Show Other Applications").

1 Answer

+1 vote
Best answer
Yes, you can. yEd supports opening a diagram at application start-up time by means of a command line argument. You can use the parameter both with a locally installed yEd, as well as via Java Web Start.

Local yEd

The yEd graph editor application can be started with a filename parameter on the command line resulting in the corresponding diagram file being opened upon start-up. The following command line works with the locally installed yEd:

C:\Programs\yWorks\yEd>yEd.exe C:\Path\To\My\GraphML\File\MyDiagram.graphml

yEd also supports .tgf, .ygf, .graphmlz, .gml, and .xgml file types.

If you want to open the yEd graph editor via Java Web Start and still like to have a specific diagram opened, you will need to do things slightly differently.

Using the Java Web Start Launcher Application

With the open command line argument that is supported by the Java Web Start launcher application (javaws.exe on Windows), a specific diagram can be loaded at yEd start-up time.
Enter the following in a Windows command shell of your choice, ideally while in the C:\Programs\Java\jre6\bin directory (if you don't have that directory in your PATH, that is):

javaws.exe -open C:\Path\To\My\GraphML\File\MyDiagram.graphml http://www.ywo

Modifying the yEd .jnlp File

The local copy of the .jnlp file that is used by the Java Web Start Launcher application can be modified in order to load a specific diagram at yEd start-up time.
The example shows a modified yed.jnlp file where a GraphML file has been added to the originally empty <application-desc> element. This .jnlp file can be double-clicked in the Windows Explorer in order to start yEd.

<!-- JNLP File for yED graph editor application. -->
<jnlp spec="1.0+" codebase="http://www.yworks.com/products/yed/demo" href="yed.jnlp">
    <title>yEd Graph Editor</title>
    <vendor>yWorks GmbH</vendor>
    <homepage href="http://www.yworks.com"/>
    <description>yEd Graph Editor</description>
    <description kind="short">An editor for graphs and diagrams that uses the cap
abilities of the graph visualization library yFiles.</description>
    <icon href="yball64x64.gif" width="64" height="64"/>
    <icon href="yball32x32.gif" width="32" height="32"/>
    <j2se version="1.5+" initial-heap-size="32m" max-heap-size="256m"/>
    <j2se version="1.6+" initial-heap-size="32m" max-heap-size="256m"/>
    <jar href="yed.jar"/>
  <!-- Originally, the application-desc element is empty. -->
    <!-- Here you can enter your GraphML file. -->
by [yWorks] (23.7k points)
edited by
Just add a filetype ".graphml" in explorer (extras/folder options). Then click "extended", edit action "open" and enter sth. like the following (check your local folders, mine are German) as command line:

"C:\Programme\Java\jre6\bin\javaw.exe" -jar "C:\Programme\yEd-3.10\yed.jar" -open "%1"
javaw.exe and javaws.exe are two different things! Your suggestion simply creates a regular file association for yEd. The yEd installer already does that. The article describes how to *webstart* yEd such that it loads a diagram from file.
yEd installer didn't do it on my machine - it's a customer's so I don't know about policy settings, GPO etc. I had to do it myself and found no solution elsewhere...
thanks for the explorer integration tip, it's just what i was looking for :-)
Legal Disclosure | Privacy Policy