lpcmanager

Parents 99a9767d92c5
Children e81bacef668e
Variables string must be correct for standard name. String name customize added.
--- a/LPCManager.py Wed Aug 30 10:36:13 2017 +0200
+++ b/LPCManager.py Thu Sep 07 12:55:05 2017 +0200
@@ -196,6 +196,7 @@
from controls.LocationCellEditor import LocationCellControl, LocationCellEditor
from dialogs.BrowseLocationsDialog import BrowseLocationsDialog
from py_ext import PythonFileCTNMixin
+from plcopen.structures import TestIdentifier, IDENTIFIER_MODEL
# start region // change name and location on selected variable
def OnBrowseButtonClick(self, event):
@@ -238,7 +239,12 @@
def GetName(self):
if hasattr(self, "VariableName"):
- return self.VariableName
+ tmpName = self.VariableName
+ position = tmpName.find(": ")
+ tmpName = tmpName[position:]
+ tmpName.replace(' ', '')
+ if TestIdentifier(tmpName):
+ return self.VariableName
else:
return None