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
|
Note:
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
rks.com/products/yed/demo/yed.jnlp
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 spec="1.0+" codebase="http://www.yworks.com/products/yed/demo" href="yed.jnlp">
<information>
<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"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<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"/>
</resources>
<application-desc>
<argument>http://www.yworks.com/products/graphml/demo/yext/graphml/resources/ygr
aph/funky.graphml</argument>
</application-desc>
</jnlp>
|