Oops, the setGridSpacing command is only available in Max 2008 or later, looks like you're on an earlier version, so it won't work. Use gridPrefs.spacing instead...if gridPrefs.spacing == 1.0 then gridPrefs.spacing = 0.1else gridPrefs.spacing = 1.0 There's also the gridPrefs.majorLines value, sets the major line spacing to…