Handling with blocks

Dear All,

I have creating a macro to get the text inside the block to compare with another string in drawing.

I want to know how to get the used block in sheet without getting the drawing file blocks (For your reference:find the attachment).

 

We have done the macro for single sheet in a drawing.

Since we have multiple sheets, I need to check whether particular block inserted in particular sheet.

Please help me to resolve this and provide the sample code.

Regards

Manikandan.B

SolidworksApi macros