Get Started
Documentation

GetNextDrawing

GetNextDrawing() → { ApiImage | false }

Gets the next inline drawing object. Throws an error if this inline drawing object is the last.

Returns:

Type
ApiImage | false

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(104, 155, 104));
oStroke = Api.CreateStroke(0, Api.CreateNoFill());
oDrawing = Api.CreateShape("cube", 3212465, 963295, oFill, oStroke);
oParagraph.AddDrawing(oDrawing);
oCopyDrawing = oDrawing.Copy();
oParagraph.AddDrawing(oCopyDrawing);
oNextDrawing = oDrawing.GetNextDrawing();
oNextDrawing.SetHorFlip(true);
builder.SaveFile("docx", "GetNextDrawing.docx");
builder.CloseFile();