Is there any way to remove AOT object from AX project through code?

In AX 2009 when I loop through object inside a project, is there any way to remove AOT object from AX project through code? (I don’t mean deleting the object from AOT, I mean just removing it from project)

I assume that ProjectNode.removeFromProject() is what you’re looking for.