You don't have to transfer the information about a parent object into the object, you want to evaluate, by any kind of script. If you want to generate a list of the doors/windows/etc. and include the information of the rooms (or other parent objects) they belong to, you can always call the PARENT(...) function of the Allplan formula interpreter, when evaluating the content of a drawing file. For example,
the following query in a report (in the section <CommandText>):
SELECT
@10@[Name=AllrightBauteilID],
Name=ParentLength|f=PARENT(@220@)]
FROM [Filter=@OBJ@.eq.1760,Type=0]
...will select all PythonParts in the drawing file and create a list with the first column containing the AllplanID and the second column containing the length of the parent object. The evaluated PythonParts don't have to contain this information, they only need to habe a PARENT-CHILD connection to another object.
If you want to keep an information about the parent object in the PythonPart, consider the formula Attributes, that can also refer to parent objects.
The problem you will encounter here is, that your PythonParts cannot be a CHILD object of anything, as long as you wand to keep the modification feature.