addComment

addComment(shapeID, comment) (1 of 3)

Adds comment to a shape with shape’s id.

ParameterTypeDescription
shapeIDlongThe ID of shape which is adding comment.
commentStringComment’s string.

addComment(shape, comment) (2 of 3)

Adds comment to a shape.

ParameterTypeDescription
shapeShapeSpecifies the shape which is adding comment .
commentStringComment’s string.

addComment(pinX, pinY, comment) (3 of 3)

Adds comment with defined PinX and PinY.

ParameterTypeDescription
pinXfloatSpecifies the x-coordinate of the comment’s pin (center of rotation) in relation to the page.
pinYfloatSpecifies the y-coordinate of the comment’s pin (center of rotation) in relation to the page.
commentStringComment’s string.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");

var diagram = new aspose.diagram.Diagram("Drawing1.vsdx");
// Add comment
diagram.getPages().getPage(0).addComment(7.205905511811023, 3.880708661417323, "test@");
// Save diagram
diagram.save("out-AddPageLevelCommentInVisio.vsdx", aspose.diagram.SaveFileFormat.VSDX);