On 30/10/2014 at 08:58, xxxxxxxx wrote:
Hi,
I have a project which contains these methods:
def GetNextObject(self, op) :
if op == None:
return None
if op.GetDown() :
return op.GetDown()
while not op.GetNext() and op.GetUp() :
op = op.GetUp()
return op.GetNext()
def IterateHierarchy(self, op) :
if op is None:
return
count = 0
while op:
count += 1
print op.GetName()
op = self.GetNextObject(op)
return count
Inside Init I call IterateHierarchy; if I do it with the first object, he prints all my objects.
However when I try to do it with the tagobject it returns None Objects.
I get them by this:
global firstobject
firstobject = doc.GetFirstObject()
global tagobject
tagobject = tag.GetObject()
Does anybody see the problem here?
Thanks in advance for your awesome help!