Selecting all sketch items in a view and make them a block.

I'm trying to select all sketch items in a view inserted from a dxf file and make a block of them.

I need a code to select all sketch entities and annotations in a drawing view and make them into a block.

Thanks.

SolidworksApi macros