Solved Move objects in the hierarchy

Hi,

With a script, I create a large number of objects in my scene.
In the hierarchy, they are presented in the form of a list, which becomes difficult to read because it's too long.
So I want to put the names of the child objects under the name of the root object.
How can I do this ?

def hierarchie_organise(doc, object_root, list_object):
	# document name: doc
	# object root: object_root
	# child objects: list_object 

	# checking (exclusion of the root object if it's in the list of child objects)
	list_child = []
	for object in list_object:
		if object != object_root:
			list_child.append(object)

	# positioning of list_child objects under the object_root object
	...
	...
	...

	return 

Truepic1.png

I found the solution on https://plugincafe.maxon.net/
It was enough in the for loop to add the following line of code:

for object in list_object:
if object != object_root:
object.InsertUnder(object_root)
c4d.EventAdd()