POULibrary.py
branchwxPython4
changeset 3705 fcf3dcc8ab3b
parent 3704 c17fac18c663
child 3750 f62625418bff
--- a/POULibrary.py	Thu Dec 15 14:55:30 2022 +0100
+++ b/POULibrary.py	Thu Dec 15 14:59:27 2022 +0100
@@ -44,7 +44,7 @@
 
     def GetSTCode(self):
         if not self.program:
-            self.program = self.LibraryControler.GenerateProgram()[0]+"\n"
+            self.program = self.LibraryControler.GenerateProgram(noconfig=True)[0]+"\n"
         return self.program
 
     def GetName(self):
@@ -65,9 +65,14 @@
 
     def GlobalInstances(self):
         """
-        @return: [(instance_name, instance_type),...]
+        @return: [varlist_object, ...]
         """
-        return []
+        varlists = []
+        for configuration in self.LibraryControler.Project.getconfigurations():
+            varlist = configuration.getglobalVars()
+            if len(varlist)>0 :
+                varlists += varlist
+        return varlists
 
     def FatalError(self, message):
         """ Raise an exception that will trigger error message intended to