POULibrary.py
changeset 3704 c17fac18c663
parent 3302 c89fc366bebd
child 3750 f62625418bff
--- a/POULibrary.py	Tue Nov 29 10:59:53 2022 +0100
+++ b/POULibrary.py	Thu Dec 08 11:17:15 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