GetParentSheet
Returns the parent sheet of the current drawing.
Syntax
expression.GetParentSheet();
expression
- A variable that represents a ApiDrawing class.
Parameters
This method doesn't have any parameters.
Returns
Example
This example show get drawing parent sheet.
- Code
- Result
let worksheet = Api.GetActiveSheet();
let fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
let shape = worksheet.AddShape("flowChartOnlineStorage", 60 * 36000, 35 * 36000, fill, stroke, 0, 2 * 36000, 0, 3 * 36000);
let parentSheet = shape.GetParentSheet();
let content = shape.GetDocContent();
let paragraph = content.GetElement(0);
paragraph.AddText("Parent sheet name is " + parentSheet.GetName());