GetAlias
Get the alias attribute for this container
Returns:
- Type
-
string
Example
Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oBlockLvlSdt = Api.CreateBlockLvlSdt();
oBlockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control with alias '№1'.");
oBlockLvlSdt.SetAlias("№1");
oDocument.AddElement(0, oBlockLvlSdt);
oAlias = oBlockLvlSdt.GetAlias();
oParagraph = oDocument.GetElement(1);
oParagraph.AddText("Alias: " + oAlias);
builder.SaveFile("docx", "GetAlias.docx");
builder.CloseFile();
Resulting document