Collect Elements from the browser, how, is this a transaction?

Thank you! thats the current status:

Types = ["Blau","Gelb","Rot"]

doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)

myDoors = FilteredElementCollector(doc).
OfCategory(BuiltInCategory.OST_Doors).WhereElementIsNotElementType().ToElements()
Symbl = FilteredElementCollector(doc).
OfCategory(BuiltInCategory.OST_DetailComponents).WhereElementIsElementType().ToElements()

elements = UnwrapElement(myDoors)
points =[]

 for e in elements:
   bb = e.get_BoundingBox(None)
      if not bb is None:
	     centre = bb.Min+(bb.Max-bb.Min)/2
	     points.append(centre.ToPoint())

for s in Symbl:
try:
	if Types.Contains(s.Family.Name):
		output.append(s)
except:
	pass
		
TransactionManager.Instance.TransactionTaskDone()

OUT = points