InsertModelAnnotations3 Api is not supporting.

In SolidWorks, I am trying to retrieve dimensions of hidden features using model items. When done manually, it works. However, when I try to record it using a macro or implement it through C# code, it does not work.

Is there any limitation related to this?

  object[]  annotations = (object[])drawingDoc.InsertModelAnnotations3(
     (int)swImportModelItemsSource_e.swImportModelItemsFromEntireModel,
     (int)swInsertAnnotation_e.swInsertDimensionsMarkedForDrawing,
     false,  // include items from assembly
     false, // do not include hole callouts
     true,
     false);