Last active
August 29, 2015 14:07
-
-
Save hanswillem/e019062b6304e4beb66e to your computer and use it in GitHub Desktop.
Function that returns all objects in the hierarchy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #GetAllObjects | |
| def getAllObjects(): | |
| allObjs = [] | |
| def itterate(obj): | |
| while obj: | |
| allObjs.append(obj) | |
| itterate(obj.GetDown()) | |
| obj = obj.GetNext() | |
| return allObjs | |
| obj = doc.GetFirstObject() | |
| itterate(obj) | |
| return allObjs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment