Auto Crop Region to Element

Hello,

I looking for scrip which crop the selected element or element in multiple views. I have tried with all available nodes but not working as required. Help on this is much appreciated please.