diff -r 5b18d98aa4f9 -r 047e36c63736 PLCControler.py --- a/PLCControler.py Wed Sep 17 17:59:53 2008 +0200 +++ b/PLCControler.py Thu Sep 18 08:05:55 2008 +0200 @@ -560,6 +560,15 @@ self.SetPouInterfaceReturnType(pou_name, "BOOL") self.BufferProject() + def ProjectCreatePouFrom(self, name, from_name): + if self.Project is not None: + pou = self.Project.getpou(from_name) + if pou is not None: + new_pou = self.Copy(pou) + new_pou.setname(name) + self.Project.insertpou(-1, new_pou) + self.BufferProject() + # Remove a Pou from project def ProjectRemovePou(self, pou_name): if self.Project is not None: @@ -2576,7 +2585,7 @@ extras = {"xmlns" : "http://www.plcopen.org/xml/tc6.xsd", "xmlns:xhtml" : "http://www.w3.org/1999/xhtml", "xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance", - "xsi:schemaLocation" : "http://www.plcopen.org/xml/tc6.xsd http://www.plcopen.org/xml/tc6.xsd"} + "xsi:schemaLocation" : "http://www.plcopen.org/xml/tc6.xsd"} text += self.Project.generateXMLText("project", 0, extras) if filepath: