Investigating the effect of Opacity in Soft X-Ray Spectral Lines Emitted by Solar Coronal Active Regions