--- a/plcopen/plcopen.py Thu Dec 10 16:37:11 2009 +0100
+++ b/plcopen/plcopen.py Sat Dec 12 20:37:35 2009 +0100
@@ -649,10 +649,12 @@
setattr(cls, "GetCustomBlockResource", GetCustomBlockResource)
# Return Data Types checking for recursion
- def GetCustomDataTypes(self, exclude = ""):
+ def GetCustomDataTypes(self, exclude = "", complextypes = True):
customdatatypes = []
for customdatatype in self.getdataTypes():
customdatatype_name = customdatatype.getname()
+ if not complextypes and customdatatype.baseType.getcontent()["name"] in ["array", "struct"]:
+ continue
if customdatatype_name != exclude and not self.ElementIsUsedBy(exclude, customdatatype_name):
customdatatypes.append(customdatatype_name)
return customdatatypes