PLCControler.py
changeset 1852 70c1cc354a8f
parent 1850 614396cbffbf
child 1872 866fb3ab8778
equal deleted inserted replaced
1851:1b8b5324506c 1852:70c1cc354a8f
  2328                     instance_copy.filterConnections(wires)
  2328                     instance_copy.filterConnections(wires)
  2329                     text += instance_copy.tostring()
  2329                     text += instance_copy.tostring()
  2330             element.remove(copy_body)
  2330             element.remove(copy_body)
  2331         return text
  2331         return text
  2332 
  2332 
  2333     def GenerateNewName(self, tagname, name, format, start_idx=0, exclude={}, debug=False):
  2333     def GenerateNewName(self, tagname, name, format, start_idx=0, exclude=None, debug=False):
  2334         names = exclude.copy()
  2334         names = {} if exclude is None else exclude.copy()
  2335         if tagname is not None:
  2335         if tagname is not None:
  2336             names.update(dict([(varname.upper(), True)
  2336             names.update(dict([(varname.upper(), True)
  2337                                for varname in self.GetEditedElementVariables(tagname, debug)]))
  2337                                for varname in self.GetEditedElementVariables(tagname, debug)]))
  2338             words = tagname.split("::")
  2338             words = tagname.split("::")
  2339             if words[0] in ["P", "T", "A"]:
  2339             if words[0] in ["P", "T", "A"]: