Change position of shapes

Hi,


Thanks for you all your help. I’m creating a visio file with aspose (.vdx) I need to change the position of the shapes in the Diagram.

My function is this:

Diagram diagram = new Diagram(dataDir + “Basic Shapes.vss”);
long shapeId = diagram.AddShape(2.0, 2.0, 2, 1, @“Rectangle”, 0);
Shape shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Rectangle text.”));

// Add a new star shape
shapeId = diagram.AddShape(6.0,6.0, 2, 2, @“Star 7”, 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Star text.”));

// Add a new hexagon shape
shapeId = diagram.AddShape(7.0, 3.0, 2, 2, @“Hexagon”, 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Hexagon text.”));

// Save the new diagram
diagram.Save(dataDir + “CreatingDiagramWithAspose_out.vdx”, SaveFileFormat.VDX);
// ExEnd:CreatingDiagramWithAspose
loadDiagram(dataDir, “CreatingDiagramWithAspose_out.vdx”);


But in the result the shapes are in the same position.


I Attach the code (visual studio 2015) and the result.

Thanks!!!

Hi,


Thank you for contacting support. We have tested your source code against the latest version 17.02.0 of Aspose.Diagram for .NET API. The resulting drawing is showing shapes on different positions. We have attached the output VDX file for your kind reference. Please download and use the latest version of Aspose.Diagram for .NET 17.02.0 and let us know how that goes on your side. Your response is awaited.

Thanks!!! with the latest version 17.02.0. It works ok

Hi,


Thank you for the confirmation. It is nice to hear from you that the problem has been resolved. Please let us know in case of any further assistance or questions.

I’m sorry, can you help me again…Please!!!


If I ty with other shapes. It dont’ work … This is my code…

string dataDir = GetDataDir_Diagrams();
Diagram diagram = new Diagram(dataDir + “MyStencil.vss”);

long shapeId = diagram.AddShape(0, 0, @“Task”, 0);
Shape shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Task .”));

shapeId = diagram.AddShape(0, 0,@“Pool / Lane”, 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Pool.”));

shapeId = diagram.AddShape(0, 0, @“Start Event”, 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@“Start .”));

// Save the new diagram
diagram.Save(dataDir + “CreatingDiagramWithAspose_out.vdx”, SaveFileFormat.VDX);
// ExEnd:CreatingDiagramWithAspose
loadDiagram(dataDir, “CreatingDiagramWithAspose_out.vdx”);


The shapes are in the postion 0,0, but in the diagram they are in other position…


I attach my project.

Thanks!!!


And other think…


When I open the Visio file appear some warnings like this…


[Warning] DataType:
Context: Line 6 —
Description: An element in this file contains data that is invalid or inappropriate for the expected type of data. Visio has substituted an appropriate value.

[Warning] DataType:
Context: Line 6 —
Description: An element in this file contains data that is invalid or inappropriate for the expected type of data. Visio has substituted an appropriate value.

[Warning] DataType:
Context: Line 6 —
Description: An element in this file contains data that is invalid or inappropriate for the expected type of data. Visio has substituted an appropriate value.


Thanks…


Hi,


Thank you for the inquiry. We managed to replicate the problem of incorrect position of the shapes. It has been logged under ticket ID DIAGRAMNET-51153 in our bug tracking system. Your post has also been linked to this ticket. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Hi,


Thank you for being patient. We have a good news for you that the ticket ID DIAGRAMNET-51153 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version 17.03.0 of Aspose.Diagram for .NET API. We’ll inform you via this forum thread as soon as the new release is published.

Thanks Team!!

Do you know if can I use a preliminar version, maybe I would do some tests. I can help you if you want.

Consu

Hi Consu,


Thank you for he inquiry. Our product team is testing this issue (DIAGRAMNET-51153) internally and after the completion of successful testing, they may later release a Hotfix. We’re in communication with them. We’ll let you know once the bug fix is available.

Hi Consu,


Thank you for being patient. In reference to the ticket ID DIAGRAMNET-51153, please download and use the latest Hotfix version: Aspose.Diagram for .NET 17.02.1.0. Please also let us know how that goes on your side.



Thank you very much, I'll test!!! :)

Consu

The issues you have found earlier (filed as DIAGRAMNET-51153) have been fixed in Aspose.Diagram for .NET 17.3.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.