I found that when use XCAFDoc_ViewTool to create a view,the note has been linked to Clip Plane but not the specified View. As a reasult, we failed to get the notes in the view by using the function asbelow:
XCAFDoc_ViewTool::GetRefNoteLabel(const TDF_Label& theViewL, TDF_LabelSequence& theNoteLabels)
I think this is a bug of XCAFDoc_ViewTool.cxx at line 238 in OCCT 7.4.0 .
Thank you for your great job!