yEd.XGML
1.0.1
dotnet add package yEd.XGML --version 1.0.1
NuGet\Install-Package yEd.XGML -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="yEd.XGML" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add yEd.XGML --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: yEd.XGML, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install yEd.XGML as a Cake Addin #addin nuget:?package=yEd.XGML&version=1.0.1 // Install yEd.XGML as a Cake Tool #tool nuget:?package=yEd.XGML&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
YED.XGML
Description
File tool for yed .XGML files.
- Open or create a file.
- Change file contents.
- Save the result to a file. The library is not complete: not all possible file fields are processed and described
Usage example:
using yEd.XGML.DocumentEntities;
//file contains 3 nodes
string TestFile_Src = @"Documents\Document1.xgml";
//result file
string TestFile_Dst = @"Documents\Document2.xgml";
Document xgml_document = Document.Load(TestFile_Src);
var nodes = xgml_document .Nodes;
//Change node text
nodes[0].label = "N_O_D_E 0";
//Change color
nodes[0].graphics.fill = Color.Red;
//Change position
nodes[1].graphics.x -= 100;
nodes[2].graphics.x += 100;
//Create node
var new_id = xgml_document.GetMaxNodeID + 1;
xgml_document.Elements.Add(id, new Node()
{
id = id,
label = "NewNode"
});
xgml_document.SaveAs(TestFile_Dst);
Namespace and classe
//XGML Read/Write classes yEd.XGML.IO //XGML data model entities yEd.XGML.DocumentEntities
The main entities: yEd.XGML.DocumentEntities.Document yEd.XGML.DocumentEntities.NodeEntitie.Node yEd.XGML.DocumentEntities.GroupNodeEntitie.GroupNode yEd.XGML.DocumentEntities.EdgeEntitie.Edge
class yEd.XGML.DocumentEntities.Document
{
//Collection of nodes and groups
Dictionary<int, IElement> Element
//ReadOnly graph nodes collection
Nodes => Elements.Values
.OfType<Node>()
.ToDictionary(e => e.id);
//ReadOnly graph group containers collection
GroupNode => Elements.Values
.OfType<GroupNode>()
.ToDictionary(e=> e.id);
//Collection of edges
List<Edge> Edges
// Read from yed .xgml file
static Document Load(string file)
// Save to file
void SaveAs(string file)
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 1,012 | 10/6/2019 |