I am trying to access the messages written to Messages window using ScriptEngine.
Looking in the documentation i found function get_messages() which takes either GUID or string with GUID as input. However, this requires some knowledge about internals in CoDeSys IDE. I hope someone can help by providing the GUID for common message windows. The list I hope can be completed is:
Script Messages = {194B48A9-AB51-43ae-B9A9-51D3EDAADDF3} # Found this one in documentation
Library Manager = ?
Build = ?
Export/Import = ?
This works fine to get "Script Messages", but can someone provide the GUID to access other message windows?
Best regards,
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-09-28
Originally created by: M.Schaber
Hi, Frank,
This documentation is part of the Automation Platform SDK documentation, one just needs to search all IMessageCategory implementations in the CoDeSysV3_TypeList.txt.
As most customers don't have that documentation, I did search that file, and here's the result:
Typename:Â Â Â Â _3S.CoDeSys.AlarmConfigurationEditors.Common.Messages.AlarmManagementMessageCategoryTypeGUID:Â Â Â Â {baf0bc39-fafb-4369-9581-bf8b0a686070}Typename:Â Â Â Â _3S.CoDeSys.AlarmConfigurationObjects.AlarmManagementMessageCategoryTypeGUID:Â Â Â Â {41db65b7-aaa7-484f-bb34-e7631996a6bb}Typename:Â Â Â Â _3S.CoDeSys.BuildCommands.GenerateFilesMessageCategoryTypeGUID:Â Â Â Â {b89b1364-9731-4a22-98bb-52cbc02c3bb1}Typename:Â Â Â Â _3S.CoDeSys.CAMObject.CAMMessageCategoryTypeGUID:Â Â Â Â {de128929-86dd-4c5e-82c8-09aa2f3d8abe}Typename:Â Â Â Â _3S.CoDeSys.CFCEditor.CFCMessageCategoryTypeGUID:Â Â Â Â {c0026af3-6438-41d4-9b57-52a98ec1a5c3}Typename:Â Â Â Â _3S.CoDeSys.CNCEditor.MessageCatCNCTypeGUID:Â Â Â Â {98645949-11e1-41d0-85d7-44c3d9ff66cc}Typename:Â Â Â Â _3S.CoDeSys.CNCEditor.MessageCatDXFTypeGUID:Â Â Â Â {8f335799-15e2-49b6-95c9-06fd7fb82c13}Typename:Â Â Â Â _3S.CoDeSys.CNCEditor.MessageCatTrafoTypeGUID:Â Â Â Â {422e29d5-a285-4037-bf5d-af47bf480443}Typename:Â Â Â Â _3S.CoDeSys.CoDeSysProjectConverter.ImportMessageCategoryTypeGUID:Â Â Â Â {99448a91-5c77-4509-af1c-74761362644d}Typename:Â Â Â Â _3S.CoDeSys.Composer.MessageCatModuleTreeTypeGUID:Â Â Â Â {936e1a33-3af8-47fa-b40b-903f0ae0b6cc}Typename:Â Â Â Â _3S.CoDeSys.CrossReferenceView.CrossRefMessageCategoryTypeGUID:Â Â Â Â {7f243287-38d0-4d66-be14-03a65f221557}Typename:Â Â Â Â _3S.CoDeSys.DefaultGatewayClient.OnlineMessageCategoryTypeGUID:Â Â Â Â {84841b51-ac83-4269-b219-0c147abec8b6}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorASInterface.ASiMessageCategoryTypeGUID:Â Â Â Â {ab7e1be9-5b66-49a8-865f-81c856677eb6}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorCANbus.CANbusMessageCategoryTypeGUID:Â Â Â Â {20fbc011-8041-406f-bc58-edbfa04369aa}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorCIP.DeviceNet.DeviceNetMessageCategoryTypeGUID:Â Â Â Â {fdcddaa5-15a5-49a2-89b0-c0dc3b0c93ed}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorIOLink.Messages.IOLinkMessageCategoryTypeGUID:Â Â Â Â {d5847e2e-ad44-4c9b-9dcc-dfcc71dbab3e}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorProfibus.GsdFileMessageCategoryTypeGUID:Â Â Â Â {d6fd5797-fed4-494b-8146-1dd8cd1abfff}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorProfibus.ProfibusMessageCategoryTypeGUID:Â Â Â Â {10d20ced-d346-4705-9bb9-abe6b94f5c03}Typename:Â Â Â Â _3S.CoDeSys.DeviceEditorSercos3.Sercos3MessageCategoryTypeGUID:Â Â Â Â {25eb8bf9-d47a-4964-b1c7-da255ca0a63c}Typename:Â Â Â Â _3S.CoDeSys.DeviceObject.DeviceMessageCategoryTypeGUID:Â Â Â Â {40f0865b-0ef6-4fd7-a75c-f44c58bd9f5e}Typename:Â Â Â Â _3S.CoDeSys.EdsDeviceDescriptionConverter.EdsDeviceDescriptionConverterMessageCategoryTypeGUID:Â Â Â Â {e3de84bd-37ff-4ddd-b17e-f74da2739f5d}Typename:Â Â Â Â _3S.CoDeSys.Engine.PerformanceMessageCategoryTypeGUID:Â Â Â Â {353ee8d1-a58e-4d26-99a5-46f530a9c26d}Typename:Â Â Â Â _3S.CoDeSys.Ethercat.EtherCATMessageCategoryTypeGUID:Â Â Â Â {f7055c0f-8545-4b4b-90e1-d2bc6ec9df47}Typename:Â Â Â Â _3S.CoDeSys.FdtCommunicationManager.FdtCommunicationMessageCategoryTypeGUID:Â Â Â Â {ec8da22b-67ed-4569-9748-f88074d8f5ff}Typename:Â Â Â Â _3S.CoDeSys.FdtIntegration.FDTMessageCategoryTypeGUID:Â Â Â Â {b8495fb7-85d4-4f20-b5ad-f9cb99d2dc13}Typename:Â Â Â Â _3S.CoDeSys.FileCommands.FileMergeMessageCategoryTypeGUID:Â Â Â Â {afdb3b27-d3e9-4e8f-8a99-f10c45ae7715}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults10MessageCategoryTypeGUID:Â Â Â Â {c0f86177-d13a-40ba-ae45-e7de6a117747}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults11MessageCategoryTypeGUID:Â Â Â Â {e6803d00-0cb1-43dd-830e-23093bb70530}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults12MessageCategoryTypeGUID:Â Â Â Â {3ee837dc-8cf8-44a1-9181-25d7f61b705d}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults13MessageCategoryTypeGUID:Â Â Â Â {e774283b-0b38-4329-bf03-b83b6c67f0e8}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults14MessageCategoryTypeGUID:Â Â Â Â {db816812-22bd-4dc2-a4e1-792d16d95ca0}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults15MessageCategoryTypeGUID:Â Â Â Â {273e6d94-4bfa-4948-b3ce-e5887d8927e3}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults16MessageCategoryTypeGUID:Â Â Â Â {23de5dc2-1439-4a85-8ac1-ad46599a8fdf}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults1MessageCategoryTypeGUID:Â Â Â Â {0b4f7286-39b6-4849-833c-da14b0252650}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults2MessageCategoryTypeGUID:Â Â Â Â {f029df34-5a39-4e0f-9e63-fc5ab7b9461c}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults3MessageCategoryTypeGUID:Â Â Â Â {35d53a89-8ef0-4f79-8a45-530492e22ca6}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults4MessageCategoryTypeGUID:Â Â Â Â {bde22aa1-b27e-4ea2-8c98-8bff8f9cab89}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults5MessageCategoryTypeGUID:Â Â Â Â {5c6ef8b0-96a3-4663-a14b-2f95fce00f9e}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults6MessageCategoryTypeGUID:Â Â Â Â {3109d494-a6cd-47c4-b694-91e4130a2867}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults7MessageCategoryTypeGUID:Â Â Â Â {d91e440a-298f-4711-94f2-51625efc9181}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults8MessageCategoryTypeGUID:Â Â Â Â {0e586dd0-2569-4c1b-8609-f69968a8b841}Typename:Â Â Â Â _3S.CoDeSys.FindReplace.FindResults9MessageCategoryTypeGUID:Â Â Â Â {6d730afc-3e46-44dc-96f8-5b853d69bd17}Typename:Â Â Â Â _3S.CoDeSys.ImagePool.SaveArchiveMessageCategoryTypeGUID:Â Â Â Â {67d4dfa1-4cb9-4105-a6f5-966a6f4a946e}Typename:Â Â Â Â _3S.CoDeSys.LanguageModelManager.CompilerMessageCategoryTypeGUID:Â Â Â Â {97f48d64-a2a3-4856-b640-75c046e37ea9}Typename:Â Â Â Â _3S.CoDeSys.LanguageModelManager.PreCompileMessageCategoryTypeGUID:Â Â Â Â {217bc73e-759b-4a3c-bfa1-991c938a6541}Typename:Â Â Â Â _3S.CoDeSys.LibManObject.LibManObjectMessageCategoryTypeGUID:Â Â Â Â {56a60174-4139-411b-86c7-df0da1cfc088}Typename:Â Â Â Â _3S.CoDeSys.ObjectCommands.ExportImportMessageCategoryTypeGUID:Â Â Â Â {2af7707f-6167-4a76-a40e-430967be0f18}Typename:Â Â Â Â _3S.CoDeSys.ObjectManager.ArchiveReporterMessageCategoryTypeGUID:Â Â Â Â {81a03426-d862-48bc-b069-61860c0ca737}Typename:Â Â Â Â _3S.CoDeSys.OnlineCommands.DownloadMessageCategoryTypeGUID:Â Â Â Â {142f9dd8-31bf-4221-934c-a7ee8ff50fe0}Typename:Â Â Â Â _3S.CoDeSys.PLCopenXML.PLCopenXMLExportMessageCategoryTypeGUID:Â Â Â Â {261e4040-069f-4953-872a-8ad34500a243}Typename:Â Â Â Â _3S.CoDeSys.PLCopenXML.PLCopenXMLImportMessageTypeGUID:Â Â Â Â {87bbc98c-4b5e-4c1c-b3c4-b4451958de3a}Typename:Â Â Â Â _3S.CoDeSys.ScriptEngine.ScriptMessageCategoryTypeGUID:Â Â Â Â {194b48a9-ab51-43ae-b9a9-51d3edaaddf3}Typename:Â Â Â Â _3S.CoDeSys.SymbolConfigObject.SymbolconfigurationCategoryTypeGUID:Â Â Â Â {87900b29-3bf1-4e32-b06a-0299efa990a6}Typename:Â Â Â Â _3S.CoDeSys.TaskEditor.ProfilingMessageCategoryTypeGUID:Â Â Â Â {4f1c23ab-6bad-4ac7-b0fd-4359edad92f3}Typename:Â Â Â Â _3S.CoDeSys.Trace.TraceMessageCategoryTypeGUID:Â Â Â Â {05263faf-c096-4326-bf22-4af1f5404f54}Typename:Â Â Â Â _3S.CoDeSys.VisualEditor.VisualMessageCategoryTypeGUID:Â Â Â Â {8287e7e9-1ebd-4310-b0f8-4e70247e8c0e}Typename:Â Â Â Â _3S.CoDeSys.VisualElemRepository.VisualElementRepositoryMessageCategoryTypeGUID:Â Â Â Â {4bb8ed78-88d1-4403-ba7b-de0f4fceae95}Typename:Â Â Â Â _3S.CoDeSys.VisualObject.HMI.HMIMessageCategoryTypeGUID:Â Â Â Â {46c8886e-21e4-4bc2-84a6-f195b0e0e3f8}Typename:Â Â Â Â _3S.CoDeSys.VisualObject.VisualObjectConversionMessageCategoryTypeGUID:Â Â Â Â {43b2a435-15ed-43d5-9569-9d75337e96ee}
(Caveat: Automation-Platform OEMs might remove or add arbitrary message categories in their own versions of CoDeSys.)
HTH,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can share my small example on how to read messages from script and print to file:
scriptMessagesMessageGUID="{194B48A9-AB51-43ae-B9A9-51D3EDAADDF3}"buildMessageGUID="{97f48d64-a2a3-4856-b640-75c046e37ea9}"exportImportMessageGUID="{2af7707f-6167-4a76-a40e-430967be0f18}"libraryManagerMessageGUID="{56a60174-4139-411b-86c7-df0da1cfc088}"log=system.get_messages(buildMessageGUID)f=open('c:\\output.txt', 'w+', 0)forlineinlog:
  f.write(line+'\n')f.flush()f.close()
Best regards,
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to access the messages written to Messages window using ScriptEngine.
Looking in the documentation i found function get_messages() which takes either GUID or string with GUID as input. However, this requires some knowledge about internals in CoDeSys IDE. I hope someone can help by providing the GUID for common message windows. The list I hope can be completed is:
Script Messages = {194B48A9-AB51-43ae-B9A9-51D3EDAADDF3} # Found this one in documentation
Library Manager = ?
Build = ?
Export/Import = ?
Example of use:
This works fine to get "Script Messages", but can someone provide the GUID to access other message windows?
Best regards,
Frank
Originally created by: M.Schaber
Hi, Frank,
This documentation is part of the Automation Platform SDK documentation, one just needs to search all IMessageCategory implementations in the CoDeSysV3_TypeList.txt.
As most customers don't have that documentation, I did search that file, and here's the result:
(Caveat: Automation-Platform OEMs might remove or add arbitrary message categories in their own versions of CoDeSys.)
HTH,
Markus
Hi Markus,
Thank you, yet another time.
I can share my small example on how to read messages from script and print to file:
Best regards,
Frank
Since version 3.5.2.0, as stated in the documentation, categories can be enumarated through python code.
To get all the GUIDs:
system.get_message_categories(bActive=False)
Set bActive = True to get only the categories that contain at least one message.
To get a description for each category:
system.get_message_category_description(category)
where category is the GUID of the category to look for.
See:
https://help.codesys.com/webapp/System;product=ScriptEngine;version=3.5.13.0