Macro for Layer change

All,

I have a need to create a macro that can open each drawing file in a folder, turn off a layer, then close and save the drawing.  My main question is this, is there a way to turn off individual layers in a programmatic fashion?  I tried to record a macro doing this, but there was no real code generated, just skeleton setup stuff in the macro.  I am ultimately going to create a macro template so I can run it as a task from scheduler.

Any help is appreciated.

thank you,

Kevin

SolidworksApi macros