GUID for Messages windows?

2012-09-25
2021-11-10
  • Frank Jepsen - 2012-09-25

    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:

    print(system.get_messages("{194B48A9-AB51-43ae-B9A9-51D3EDAADDF3}"))
    

    This works fine to get "Script Messages", but can someone provide the GUID to access other message windows?

    Best regards,
    Frank

     
  • 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:

    Type name:        _3S.CoDeSys.AlarmConfigurationEditors.Common.Messages.AlarmManagementMessageCategory
    Type GUID:        {baf0bc39-fafb-4369-9581-bf8b0a686070}
    Type name:        _3S.CoDeSys.AlarmConfigurationObjects.AlarmManagementMessageCategory
    Type GUID:        {41db65b7-aaa7-484f-bb34-e7631996a6bb}
    Type name:        _3S.CoDeSys.BuildCommands.GenerateFilesMessageCategory
    Type GUID:        {b89b1364-9731-4a22-98bb-52cbc02c3bb1}
    Type name:        _3S.CoDeSys.CAMObject.CAMMessageCategory
    Type GUID:        {de128929-86dd-4c5e-82c8-09aa2f3d8abe}
    Type name:        _3S.CoDeSys.CFCEditor.CFCMessageCategory
    Type GUID:        {c0026af3-6438-41d4-9b57-52a98ec1a5c3}
    Type name:        _3S.CoDeSys.CNCEditor.MessageCatCNC
    Type GUID:        {98645949-11e1-41d0-85d7-44c3d9ff66cc}
    Type name:        _3S.CoDeSys.CNCEditor.MessageCatDXF
    Type GUID:        {8f335799-15e2-49b6-95c9-06fd7fb82c13}
    Type name:        _3S.CoDeSys.CNCEditor.MessageCatTrafo
    Type GUID:        {422e29d5-a285-4037-bf5d-af47bf480443}
    Type name:        _3S.CoDeSys.CoDeSysProjectConverter.ImportMessageCategory
    Type GUID:        {99448a91-5c77-4509-af1c-74761362644d}
    Type name:        _3S.CoDeSys.Composer.MessageCatModuleTree
    Type GUID:        {936e1a33-3af8-47fa-b40b-903f0ae0b6cc}
    Type name:        _3S.CoDeSys.CrossReferenceView.CrossRefMessageCategory
    Type GUID:        {7f243287-38d0-4d66-be14-03a65f221557}
    Type name:        _3S.CoDeSys.DefaultGatewayClient.OnlineMessageCategory
    Type GUID:        {84841b51-ac83-4269-b219-0c147abec8b6}
    Type name:        _3S.CoDeSys.DeviceEditorASInterface.ASiMessageCategory
    Type GUID:        {ab7e1be9-5b66-49a8-865f-81c856677eb6}
    Type name:        _3S.CoDeSys.DeviceEditorCANbus.CANbusMessageCategory
    Type GUID:        {20fbc011-8041-406f-bc58-edbfa04369aa}
    Type name:        _3S.CoDeSys.DeviceEditorCIP.DeviceNet.DeviceNetMessageCategory
    Type GUID:        {fdcddaa5-15a5-49a2-89b0-c0dc3b0c93ed}
    Type name:        _3S.CoDeSys.DeviceEditorIOLink.Messages.IOLinkMessageCategory
    Type GUID:        {d5847e2e-ad44-4c9b-9dcc-dfcc71dbab3e}
    Type name:        _3S.CoDeSys.DeviceEditorProfibus.GsdFileMessageCategory
    Type GUID:        {d6fd5797-fed4-494b-8146-1dd8cd1abfff}
    Type name:        _3S.CoDeSys.DeviceEditorProfibus.ProfibusMessageCategory
    Type GUID:        {10d20ced-d346-4705-9bb9-abe6b94f5c03}
    Type name:        _3S.CoDeSys.DeviceEditorSercos3.Sercos3MessageCategory
    Type GUID:        {25eb8bf9-d47a-4964-b1c7-da255ca0a63c}
    Type name:        _3S.CoDeSys.DeviceObject.DeviceMessageCategory
    Type GUID:        {40f0865b-0ef6-4fd7-a75c-f44c58bd9f5e}
    Type name:        _3S.CoDeSys.EdsDeviceDescriptionConverter.EdsDeviceDescriptionConverterMessageCategory
    Type GUID:        {e3de84bd-37ff-4ddd-b17e-f74da2739f5d}
    Type name:        _3S.CoDeSys.Engine.PerformanceMessageCategory
    Type GUID:        {353ee8d1-a58e-4d26-99a5-46f530a9c26d}
    Type name:        _3S.CoDeSys.Ethercat.EtherCATMessageCategory
    Type GUID:        {f7055c0f-8545-4b4b-90e1-d2bc6ec9df47}
    Type name:        _3S.CoDeSys.FdtCommunicationManager.FdtCommunicationMessageCategory
    Type GUID:        {ec8da22b-67ed-4569-9748-f88074d8f5ff}
    Type name:        _3S.CoDeSys.FdtIntegration.FDTMessageCategory
    Type GUID:        {b8495fb7-85d4-4f20-b5ad-f9cb99d2dc13}
    Type name:        _3S.CoDeSys.FileCommands.FileMergeMessageCategory
    Type GUID:        {afdb3b27-d3e9-4e8f-8a99-f10c45ae7715}
    Type name:        _3S.CoDeSys.FindReplace.FindResults10MessageCategory
    Type GUID:        {c0f86177-d13a-40ba-ae45-e7de6a117747}
    Type name:        _3S.CoDeSys.FindReplace.FindResults11MessageCategory
    Type GUID:        {e6803d00-0cb1-43dd-830e-23093bb70530}
    Type name:        _3S.CoDeSys.FindReplace.FindResults12MessageCategory
    Type GUID:        {3ee837dc-8cf8-44a1-9181-25d7f61b705d}
    Type name:        _3S.CoDeSys.FindReplace.FindResults13MessageCategory
    Type GUID:        {e774283b-0b38-4329-bf03-b83b6c67f0e8}
    Type name:        _3S.CoDeSys.FindReplace.FindResults14MessageCategory
    Type GUID:        {db816812-22bd-4dc2-a4e1-792d16d95ca0}
    Type name:        _3S.CoDeSys.FindReplace.FindResults15MessageCategory
    Type GUID:        {273e6d94-4bfa-4948-b3ce-e5887d8927e3}
    Type name:        _3S.CoDeSys.FindReplace.FindResults16MessageCategory
    Type GUID:        {23de5dc2-1439-4a85-8ac1-ad46599a8fdf}
    Type name:        _3S.CoDeSys.FindReplace.FindResults1MessageCategory
    Type GUID:        {0b4f7286-39b6-4849-833c-da14b0252650}
    Type name:        _3S.CoDeSys.FindReplace.FindResults2MessageCategory
    Type GUID:        {f029df34-5a39-4e0f-9e63-fc5ab7b9461c}
    Type name:        _3S.CoDeSys.FindReplace.FindResults3MessageCategory
    Type GUID:        {35d53a89-8ef0-4f79-8a45-530492e22ca6}
    Type name:        _3S.CoDeSys.FindReplace.FindResults4MessageCategory
    Type GUID:        {bde22aa1-b27e-4ea2-8c98-8bff8f9cab89}
    Type name:        _3S.CoDeSys.FindReplace.FindResults5MessageCategory
    Type GUID:        {5c6ef8b0-96a3-4663-a14b-2f95fce00f9e}
    Type name:        _3S.CoDeSys.FindReplace.FindResults6MessageCategory
    Type GUID:        {3109d494-a6cd-47c4-b694-91e4130a2867}
    Type name:        _3S.CoDeSys.FindReplace.FindResults7MessageCategory
    Type GUID:        {d91e440a-298f-4711-94f2-51625efc9181}
    Type name:        _3S.CoDeSys.FindReplace.FindResults8MessageCategory
    Type GUID:        {0e586dd0-2569-4c1b-8609-f69968a8b841}
    Type name:        _3S.CoDeSys.FindReplace.FindResults9MessageCategory
    Type GUID:        {6d730afc-3e46-44dc-96f8-5b853d69bd17}
    Type name:        _3S.CoDeSys.ImagePool.SaveArchiveMessageCategory
    Type GUID:        {67d4dfa1-4cb9-4105-a6f5-966a6f4a946e}
    Type name:        _3S.CoDeSys.LanguageModelManager.CompilerMessageCategory
    Type GUID:        {97f48d64-a2a3-4856-b640-75c046e37ea9}
    Type name:        _3S.CoDeSys.LanguageModelManager.PreCompileMessageCategory
    Type GUID:        {217bc73e-759b-4a3c-bfa1-991c938a6541}
    Type name:        _3S.CoDeSys.LibManObject.LibManObjectMessageCategory
    Type GUID:        {56a60174-4139-411b-86c7-df0da1cfc088}
    Type name:        _3S.CoDeSys.ObjectCommands.ExportImportMessageCategory
    Type GUID:        {2af7707f-6167-4a76-a40e-430967be0f18}
    Type name:        _3S.CoDeSys.ObjectManager.ArchiveReporterMessageCategory
    Type GUID:        {81a03426-d862-48bc-b069-61860c0ca737}
    Type name:        _3S.CoDeSys.OnlineCommands.DownloadMessageCategory
    Type GUID:        {142f9dd8-31bf-4221-934c-a7ee8ff50fe0}
    Type name:        _3S.CoDeSys.PLCopenXML.PLCopenXMLExportMessageCategory
    Type GUID:        {261e4040-069f-4953-872a-8ad34500a243}
    Type name:        _3S.CoDeSys.PLCopenXML.PLCopenXMLImportMessage
    Type GUID:        {87bbc98c-4b5e-4c1c-b3c4-b4451958de3a}
    Type name:        _3S.CoDeSys.ScriptEngine.ScriptMessageCategory
    Type GUID:        {194b48a9-ab51-43ae-b9a9-51d3edaaddf3}
    Type name:        _3S.CoDeSys.SymbolConfigObject.SymbolconfigurationCategory
    Type GUID:        {87900b29-3bf1-4e32-b06a-0299efa990a6}
    Type name:        _3S.CoDeSys.TaskEditor.ProfilingMessageCategory
    Type GUID:        {4f1c23ab-6bad-4ac7-b0fd-4359edad92f3}
    Type name:        _3S.CoDeSys.Trace.TraceMessageCategory
    Type GUID:        {05263faf-c096-4326-bf22-4af1f5404f54}
    Type name:        _3S.CoDeSys.VisualEditor.VisualMessageCategory
    Type GUID:        {8287e7e9-1ebd-4310-b0f8-4e70247e8c0e}
    Type name:        _3S.CoDeSys.VisualElemRepository.VisualElementRepositoryMessageCategory
    Type GUID:        {4bb8ed78-88d1-4403-ba7b-de0f4fceae95}
    Type name:        _3S.CoDeSys.VisualObject.HMI.HMIMessageCategory
    Type GUID:        {46c8886e-21e4-4bc2-84a6-f195b0e0e3f8}
    Type name:        _3S.CoDeSys.VisualObject.VisualObjectConversionMessageCategory
    Type GUID:        {43b2a435-15ed-43d5-9569-9d75337e96ee}
    

    (Caveat: Automation-Platform OEMs might remove or add arbitrary message categories in their own versions of CoDeSys.)

    HTH,
    Markus

     
  • Frank Jepsen - 2012-10-02

    Hi Markus,

    Thank you, yet another time.

    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)
    for line in log:
        f.write(line + '\n')
    f.flush()
    f.close()
    

    Best regards,
    Frank

     
  • stmos - 2021-11-10

    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

     

Log in to post a comment.