Do you mean enable/disable the visibility or the Rhino geometry? If so, there is some discussion on some approaches here that might help. There is a ghpython example as well as a plugin by @Michael_Pryor called blindfold.