--- a/plcopen/plcopen.py Fri Nov 18 17:37:43 2011 +0100
+++ b/plcopen/plcopen.py Fri Nov 18 17:39:12 2011 +0100
@@ -1117,7 +1117,7 @@
if self.content["name"] in ["derived", "array", "subrangeSigned", "subrangeUnsigned"]:
self.content["value"].updateElementName(old_name, new_name)
elif self.content["name"] == "struct":
- for element in datatype_content["value"].getvariable():
+ for element in self.content["value"].getvariable():
element_type = element.type.updateElementName(old_name, new_name)
setattr(cls, "updateElementName", updateElementName)