First: Localize variables. Especially selection sets - as you're only allowed a finite number of active selection sets.
Second: Rather than change a system variable to stop osnaps, use the None forced snap. Otherwise you may have to reset it back, and this reset needs to happen in an error handler. IMO much more coding.
Third: Test if something has been selected - else an error occurs.
Fourth: Localize the commands and options by prefixing with underscores. So they work on other language acads as well.
This seems to work fine for me:
(command "._section" ss
"" "_YZ" "_Non" pt
)))