Getting an object from id
Hi there If I have the id of an object, how can I get the actual object in a Python Method? I have tried the following: o = getattr(self, "FooImage") This causes an AttributeError type with value validate. This probably mean that this way of aquiring an object is not available in Python Methods, but only in external Python Methods. I would prefer to use a Python Method and not an external method. B.T.W. I know that o=self.FooImage will work, but I want to use a parameter containing the id to get the object, eg. o = getattr(self, id). Thanks Etienne
Etienne Labuschagne wrote:
This causes an AttributeError type with value validate. This probably mean that this way of aquiring an object is not available in Python Methods, but only in external Python Methods. I would prefer to use a Python Method and not an external method.
Do you mean Python Method or Python Script? cheers, Chris
participants (2)
-
Chris Withers -
Etienne Labuschagne