As the phone showm, I want to add new line (not new node ) in samrtart of ppt,how I should do using aspose.
Hi,
I have worked over the requirements shared by you and suggest you to please try using the following sample code on your end to serve the purpose. I hope the shared information will be helpful.
public static void TestSmartArt()
{
Presentation pres = new Presentation();
ISlide slide = pres.getSlides().get_Item(0);
ISmartArt smart= slide.getShapes().addSmartArt(10, 10, 400, 300, com.aspose.slides.SmartArtLayoutType.VerticalBoxList);
ISmartArtNode node=smart.getAllNodes().get_Item(0);
ITextFrame textFrame = node.getTextFrame();
IParagraph para1 = new Paragraph();
para1.setText(“Line 1”);
IParagraph para2 = new Paragraph();
para2.setText(“Line 2”);
textFrame.getParagraphs().clear();
textFrame.getParagraphs().add(para1);
textFrame.getParagraphs().add(para2);
pres.save(“C:\Aspose Data\SmartArt.pptx”,SaveFormat.Pptx);
}
Many Thanks,
{
Presentation pres = new Presentation();
ISlide slide = pres.getSlides().get_Item(0);
ISmartArt smart= slide.getShapes().addSmartArt(10, 10, 400, 300, com.aspose.slides.SmartArtLayoutType.VerticalBoxList);
ISmartArtNode node=smart.getAllNodes().get_Item(0);
ITextFrame textFrame = node.getTextFrame();
IParagraph para1 = new Paragraph();
para1.setText(“Line 1”);
IParagraph para2 = new Paragraph();
para2.setText(“Line 2”);
textFrame.getParagraphs().clear();
textFrame.getParagraphs().add(para1);
textFrame.getParagraphs().add(para2);
pres.save(“C:\Aspose Data\SmartArt.pptx”,SaveFormat.Pptx);
}
Many Thanks,