This code creates camera from selected view. A feature that exist in 3DS max. in Create Camera options.