ノートを取得する
シーケンス図からノートを取得する
ノートを取得するにはISequenceDiagram.Notesプロパティを用います。
public void GetNotes(ICommandContext c, ICommandParams p)
{
    ISequenceDiagram sequenceDiagram = c.App.Workspace.CurrentEditor as ISequenceDiagram;
    if (sequenceDiagram == null) return;
    // ノートを取得します
    INoteShapeCollection notes = sequenceDiagram.Notes;
    var no = 1;
    foreach (INoteShape note in notes)
    {
        c.App.Output.WriteLine("sample", $"{no}つ目のノート : {note.Text}");
        no++;
    }
}
要素から関連するノートを取得する
要素から関連するノートを取得する例です。
public void GetNotesByElement(ICommandContext c, ICommandParams p)
{
    ISequenceDiagram sequenceDiagram = c.App.Workspace.CurrentEditor as ISequenceDiagram;
    if (sequenceDiagram == null) return;
    // 選択された要素と接続するノートアンカーから、関連するノートを取得する
    ISequenceShape element = sequenceDiagram.GetSelectedShapes().FirstOrDefault();
    var noteAnchors = sequenceDiagram.NoteAnchors.Where(a => element.Equals(a.Target));
    var notes = noteAnchors.Select(a => a.Note);
    var no = 1;
    foreach (INoteShape note in notes)
    {
        c.App.Output.WriteLine("sample", $"{no}つ目のノート : {note.Text}");
        no++;
    }
}