Model.lightswitch#
- Model.lightswitch(on, plot)#
Turns the lights on or off.
- Parameters:
on (int) – A flag that indicates if the lights should be turned off (0) or on (1).
plot (int) – A flag that indicates if the screen should be replotted after this function is executed.
Examples#
Switch the lights off and replot the screen#import hm import hm.entities as ent model = hm.Model() model.lightswitch(on=0, plot=1)
Turn the lights back on , but leave the screen as - is ( no refresh )#import hm import hm.entities as ent model = hm.Model() model.lightswitch(on=1, plot=0)