# HG changeset patch # User b.taylor@willowglen.ca # Date 1251992243 21600 # Node ID 9855343da6fc887f430219f588ef2ae3c8f978eb # Parent c08d053b74b30d828b345818f0d0e356cc1ef50c fixed renaming configurations and resources diff -r c08d053b74b3 -r 9855343da6fc PLCControler.py --- a/PLCControler.py Thu Sep 03 08:56:02 2009 -0600 +++ b/PLCControler.py Thu Sep 03 09:37:23 2009 -0600 @@ -251,7 +251,7 @@ def GetProjectConfigNames(self, debug = False): project = self.GetProject(debug) if project is not None: - return [config.getName() for config in project.getconfigurations()] + return [config.getname() for config in project.getconfigurations()] return [] # Return project pou variables @@ -734,9 +734,9 @@ def ChangeConfigurationResourceName(self, config_name, old_name, new_name): if self.Project is not None: # Found the resource corresponding to old name and change its name to new name - resource = self.Project.getconfigurationResource(config_name) + resource = self.Project.getconfigurationResource(config_name, old_name) if resource is not None: - resource.setName(new_name) + resource.setname(new_name) self.BufferProject() # Return the type of the pou given by its name