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"]: |