For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C
/*class CustomSvgShapeFormattingController::ISvgShapeFormattingController
{

	void CustomSvgShapeFormattingController()
	{
	public:
		int m_shapeIndex;

		CustomSvgShapeFormattingController(int shapeStartIndex = 0)
		{
			m_shapeIndex = shapeStartIndex;
		}

		public void FormatShape(ISvgShape svgShape, IShape shape)
		{
			svgShape.Id = string.Format("shape-{0}", m_shapeIndex++);
		}

	};
};
*/
void GeneratingSVGWithCustomShapeIDS()
{

	// The path to the documents directory.
	const String templatePath = L"../templates/TestDeck_050.pptx";
	const String outPath = L"../out/GeneratingSVGWithCustomShapeIDS_out.svg";

	// Instantiate Presentation class
	SharedPtr<Presentation> pres = MakeObject<Presentation>(templatePath);


	SharedPtr<SVGOptions> svgOptions = MakeObject< SVGOptions>();
	SharedPtr<CustomSvgShapeFormattingController>customSvgShapeFormattingController =  MakeSharedPtr<CustomSvgShapeFormattingController>(0);
	svgOptions->set_ShapeFormattingController(customSvgShapeFormattingController);

	// Access the first slide
	SharedPtr<ISlide> slide = pres->get_Slides()->idx_get(0);

	// Create a memory stream object
	SharedPtr<System::IO::MemoryStream> SvgStream = MakeObject<System::IO::MemoryStream>();

	// Generate SVG image of slide and save in memory stream
	slide->WriteAsSvg(SvgStream);
	SvgStream->set_Position(0);

	// Save memory stream to file
	try
	{
		System::SharedPtr<System::IO::Stream> fileStream = System::IO::File::OpenWrite(outPath);

		// Clearing resources under 'using' statement
		System::Details::DisposeGuard __dispose_guard_1{ fileStream, ASPOSE_CURRENT_FUNCTION };
		// ------------------------------------------
		System::ArrayPtr<uint8_t> buffer = System::MakeObject<System::Array<uint8_t>>(8 * 1024, 0);
		int32_t len;
		while ((len = SvgStream->Read(buffer, 0, buffer->get_Length())) > 0)
		{
			fileStream->Write(buffer, 0, len);
		}
	}
	catch (Exception e)
	{

	}
	SvgStream->Close();

}