GetParent
返回拥有此集合的文档。
备注
此功能仅在 ONLYOFFICE Docs 付费版本中可用。
语法
expression.GetParent();
expression - 表示 ApiTablesOfFigures 类的变量。
参数
此方法没有任何参数。
返回值
示例
获取拥有图表目录集合的文档。
// Obtain the tables of figures collection from the current document.
// Return the parent document that the collection belongs to.
let doc = Api.GetDocument();
let tablesOfFigures = doc.GetTablesOfFigures();
let parent = tablesOfFigures.GetParent();
let resultParagraph = Api.CreateParagraph();
resultParagraph.AddText("Parent class type: " + parent.GetClassType());
doc.Push(resultParagraph);