plcopen/plcopen.py
changeset 141 c0242a51774c
parent 125 394d9f168258
child 143 015a34da60eb
equal deleted inserted replaced
140:06d28f03f6f4 141:c0242a51774c
   463         for varlist in content:
   463         for varlist in content:
   464             variables = varlist["value"].getVariable()
   464             variables = varlist["value"].getVariable()
   465             for var in variables:
   465             for var in variables:
   466                 if var.getName() == old_name:
   466                 if var.getName() == old_name:
   467                     vartype_content = var.getType().getContent()
   467                     vartype_content = var.getType().getContent()
   468                     if vartype_content["value"] is not None and vartype_content["value"].getName() == old_type:
   468                     if vartype_content["name"] == "derived" and vartype_content["value"].getName() == old_type:
   469                         var.setName(new_name)
   469                         var.setName(new_name)
   470                         vartype_content["value"].setName(new_type)
   470                         vartype_content["value"].setName(new_type)
   471                         return
   471                         return
   472     setattr(cls, "changePouVar", changePouVar)
   472     setattr(cls, "changePouVar", changePouVar)
   473     
   473