How to disable features in menus except the custom OR current opened ?

I refereed below discussion

And doing

((ModelDoc2)iSwApp.ActiveDoc).SetBlockingState((int)swBlockingStates_e.swPartialModifyBlock);

From my Add In's "AfterActivation" call.

But the problem is, above call blocks everything, and I am not able to use my add in's UI as well ( property manager page).

How to overcome this issue ?

SolidworksApi macros