Turning off Guide Grids?

Hi all, I’ve pulled together a script to set the Guide Grids on certain sheets, but I’m struggling to turn them off.
GetParameterValueByName suggests the None option is a string (it’s orange) but feeding that string in doesn’t work.
Listing out the available Guide Grid options has all my A1L, A1P etc but doesn’t list a option for me to use.


Anyone able to help?

You can see from the sheets that currently use Guide Grids that the value is an element (ElementId). The user-readable value for no guide grids is <None> but the actual value is still an ElementId. Revit actually has a specific element Id object, InvalidElementId, to represent these cases of a “null element Id”. Unfortunately, it’s not currently available in Dynamo so you have to go through Python and the Revit API to get it and use it.

InvalidElementId Property

1 Like

Thanks, in that case I may try obtaining the element ID from one of the sheets currently set as none, then I might be able to get element by id and apply that in Set Parameter Value?

I’ll give it a try today.

EDIT: scratch that, the reason Dynamo reports it as a string is because as you rightly said it’s not reporting it as an element.