عام API تغييرات في Aspose.Diagram 17.01.2019

تحويل Visio الرسم بأشكال انتقائية

يمكن للمطورين تحديد أشكال معينة لتحويل رسم Visio إلى أي تنسيق آخر مدعوم. لقد أضفناالأشكالعضو فيRenderingSaveOptionsفئة لهذا الغرض. كل فئة خيار حفظ هي الشكل الممتد لفئة RenderingSaveOptions. يرجى التحقق من مثال الرمز:

C#

 // the path to the documents directory.

string dataDir = RunExamples.GetDataDir_LoadSaveConvert();

// call the diagram constructor to load diagram from a VSD file

Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx");

// create an instance SVG save options class

SVGSaveOptions options = new SVGSaveOptions();

ShapeCollection shapes = options.Shapes;

// get shapes by page index and shape ID, and then add in the shape collection object

shapes.Add(diagram.Pages[0].Shapes.GetShape(1));

shapes.Add(diagram.Pages[0].Shapes.GetShape(2));

// save Visio drawing

diagram.Save(dataDir + "SelectiveShapes_out.svg", options);