--- a/plcopen/plcopen.py Wed Mar 26 15:22:40 2008 +0100
+++ b/plcopen/plcopen.py Thu Apr 03 18:30:02 2008 +0200
@@ -831,7 +831,7 @@
def getcontentInstanceByName(self, name):
if self.content["name"] in ["LD","FBD","SFC"]:
for element in self.content["value"].getcontent():
- if element["value"].getLocalId() == name:
+ if isinstance(element["value"], PLCOpenClasses.get("fbdObjects_block", None)) and element["value"].getinstanceName() == name:
return element["value"]
else:
raise TypeError, "%s body don't have instances!"%self.content["name"]