A Dynamo script is built using a series of interconnected elements:
Search for Element.GetParameterValueByName . Connect your doors to the "Element" input. Type "Comments" into the node's text box. This reads what is currently written in the comments field. dynamo revit script