1948 if self.Project is not None: |
1948 if self.Project is not None: |
1949 words = tagname.split("::") |
1949 words = tagname.split("::") |
1950 if words[0] in ['P', 'T', 'A']: |
1950 if words[0] in ['P', 'T', 'A']: |
1951 pou = self.Project.getpou(words[1]) |
1951 pou = self.Project.getpou(words[1]) |
1952 if pou is not None: |
1952 if pou is not None: |
1953 if pou.interface is None: |
1953 pou.addpouLocalVar(type, name, location, description) |
1954 pou.interface = plcopen.pou_interface() |
1954 |
1955 pou.addpouVar(type, name, location, description) |
1955 def AddEditedElementPouExternalVar(self, tagname, type, name): |
|
1956 if self.Project is not None: |
|
1957 words = tagname.split("::") |
|
1958 if words[0] in ['P', 'T', 'A']: |
|
1959 pou = self.Project.getpou(words[1]) |
|
1960 if pou is not None: |
|
1961 pou.addpouExternalVar(type, name) |
1956 |
1962 |
1957 def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name): |
1963 def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name): |
1958 if self.Project is not None: |
1964 if self.Project is not None: |
1959 words = tagname.split("::") |
1965 words = tagname.split("::") |
1960 if words[0] in ['P', 'T', 'A']: |
1966 if words[0] in ['P', 'T', 'A']: |