HomeCommunityControl GalleryComponentsAspose.Diagram for .NET

Aspose.Diagram for .NET



Submit a Review

2 Downloads

694 Views


Description

Aspose.Diagram is a class library for working with Microsoft Visio files. It allows developers to work with VSD and VDX files on ASP .NET web applications, web services and Windows applications. It allows you to open files and manipulate the elements of the diagram, from lines and fills, to more complex elements, and then export to native Visio formats or XML. The .NET Visio class library is an alternative to the Microsoft Visio Object Model and provides a better performance. It makes use of the advanced functionality of Visio's services to manipulate Visio documents on a server. The API is extensible, easy to use and compact. It provides common functionality so that developers have to write less code when performing common tasks. Aspose.Diagrams is aimed at developers who need to work with Visio files form within their own applications. It allows you to manipulate the file format quickly and easily, saving time and effort in developing a solution for working with these files.

No Microsoft Visio Automation

Aspose.Diagram, as a pure .NET alternate for MS Visio Object Model provides much better performance and ease of use to manipulate diagrams and conversions into accepted formats. Aspose.Diagram also leverages advanced functionality provided by Visio services to manipulate Visio documents at server.

Read, Change and Write Microsoft Visio Documents

Aspose.Diagram for .NET provides a class library to read Microsoft Visio files in native VSD format as well as the Visio XML (VDX) format. The contents of the diagram can be manipulated through the Aspose.Diagram API. After making the required changes to the Visio file, the file can then be written to disk in Visio XML (VDX) format.

Platform Independence

You can use Aspose.Diagram for .NET to build any type of a 32-bit/64-bit .NET apps

Syntax Example

Updating shape properties in a Visio Diagram Updating Text Text property exposed by Shape class supports the Aspose.Diagram.Text object. This property can be used to retrieve or update the shape’s text. The following piece of code updates the shape’s text. [C#] //call diagram constructor to load diagram from a VDX file Diagram vdxDiagram = new Diagram("d:\\Drawing1.vdx"); //Find a particular shape and update its text foreach (Aspose.Diagram.Shape shape in vdxDiagram.Pages[1].Shapes) { if (shape.NameU.ToLower() == "process" && shape.ID == 1) { shape.Text.Value = "New Text"; } } vdxDiagram.Save("d:\\output.vdx", SaveFileFormat.VDX); [Visual Basic] 'call diagram constructor to load diagram from a VDX file Dim vdxDiagram As New Diagram("d:\Drawing1.vdx") 'Find a particular shape and update its text For Each shape As Aspose.Diagram.Shape In vdxDiagram.Pages(1).Shapes If shape.NameU.ToLower() = "process" AndAlso shape.ID = 1 Then shape.Text.Value = "New Text" End If Next shape vdxDiagram.Save("d:\output.vdx", SaveFileFormat.VDX) Setting XForm Data [C#] //call diagram constructor to load diagram from a VDX file Diagram vdxDiagram = new Diagram("d:\\Drawing1.vdx"); //Find a particular shape and update its XForm foreach (Aspose.Diagram.Shape shape in vdxDiagram.Pages[1].Shapes) { if (shape.NameU.ToLower() == "process" && shape.ID == 1) { shape.XForm.PinX.Value = 5; shape.XForm.PinY.Value = 5; } } vdxDiagram.Save("d:\\output.vdx", SaveFileFormat.VDX); [Visual Basic] 'call diagram constructor to load diagram from a VDX file Dim vdxDiagram As New Diagram("d:\Drawing1.vdx") 'Find a particular shape and update its XForm For Each shape As Aspose.Diagram.Shape In vdxDiagram.Pages(1).Shapes If shape.NameU.ToLower() = "process" AndAlso shape.ID = 1 Then shape.XForm.PinX.Value = 5 shape.XForm.PinY.Value = 5 End If Next shape vdxDiagram.Save("d:\output.vdx", SaveFileFormat.VDX)

Screenshots

Reviews

Submit a review