Lock layer in drawing

Is there any way to lock layer for changes?

SolidworksApi macros