/
Reading and writing to a Configuration
  • APPROVED
  • Reading and writing to a Configuration

    In EHX, the configuration is stored as a binary proprietary format, which makes third party integration via the HXN or HXC files difficult. However, it is possible to use the tools that Clear-Com provides to check for changes, run reports, and even add to the configuration file.

    Changing the configuration file outside of the screens provided by EHX is an advanced task and is not expected for users to get the most out of the system. Support may be delayed for issues resulting from external changes as our automated testing will not be checking for issues.

    Outside of EHX:

    In any .NET code editor (Rider, VS.Net, Visual Studio) create a new project as .Net Core or Framework. A console app makes sense to begin.

    Add a Reference to C:\Program Files\ClearCom\EHX Configuration System 13.0\Shared.dll, or wherever the installation resides.

    Add the using statement using Shared.ObjectModel;

    Then do:

    Project project = Project.Import(@"c:\an_hxn_file.hxn");

    You now have access to the configuration to program against;

    Project project = Project.Import(@"c:\\an_hxn_file.hxn"); Configuration configuration = project.Frames[0].ActiveConfiguration; Console.WriteLine(configuration.Cards[0].Ports.Count);

    If the HXN file contains a Linked Set, the 0 will be the index to the matrix, so matrix fifteen will be Frames[14].

    Within EHX:

    Being able to rename, report, reorder and add items to a configuration is very useful but the workflow is a little long - save HXN, close EHX, run console, save Project, open EHX - and it would be useful to make changes from within EHX whenever an Apply is made to the frame.

    Open Logic Maestro and add a New Control Macro. Drop down from Logic Diagram if you don’t see it.

    Instead of an Import, we can use the current configuration:

    Project project = EclipseClient.parentMDI.ProjectManager.CurrentProject; Configuration configuration = project.Frames[0].ActiveConfiguration;

    Example:

    In this instance, we needed to add Partylines to the configuration to use for a dynamic menu system:

    public override void OnUserStart() { const int NumberOfMenuItems = 32; const bool ShowInDynamEC = true; const string KeyLabel = "QUICKKEY{0}"; const string KeyDescription = "Quick Key for Assignment {0}"; Project project = EclipseClient.parentMDI.ProjectManager.CurrentProject; Configuration configuration = project.Frames[0].ActiveConfiguration; for (int x = 1; x <= NumberOfMenuItems; x++) { PartyLine partyLine = PartyLine.Create(configuration); var keyLabel = string.Format(KeyLabel, x.ToString().PadLeft(2, '0')); if (!configuration.PartyLines.Any(pl => pl.Label.TalkListen == keyLabel)) { partyLine.Label = Label.Create(partyLine, keyLabel.Substring(0, 5), keyLabel.Substring(5, 5)); partyLine.Description = string.Format(KeyDescription, x); partyLine.IsShared = ShowInDynamEC; partyLine.LatchDisable = true; configuration.AddPartyLine(partyLine); } } }

    System.Linq is used to search the existing Partylines for the same name to prevent duplicates being added, and the Partylines show in the EHX > Configuration > Partylines screen as expected.

    Related content

    How to add a pre-configured frame to another EHX system (project) when working offline?
    How to add a pre-configured frame to another EHX system (project) when working offline?
    More like this
    EHX Panels Import/Export Project to CSV
    EHX Panels Import/Export Project to CSV
    More like this
    Matrix: EHX 7.0.0 configuration slots now renamed to "Configuration Banks"
    Matrix: EHX 7.0.0 configuration slots now renamed to "Configuration Banks"
    More like this
    Matrix: EHX v7.1 improved workflow and faster panel programming entities / configure palette screen options
    Matrix: EHX v7.1 improved workflow and faster panel programming entities / configure palette screen options
    More like this
    Matrix: EHX v7.1 software allows user to save Production Maestro connection information files directly
    Matrix: EHX v7.1 software allows user to save Production Maestro connection information files directly
    More like this
    Matrix: The Matrix event logs are written to the EHX PC, when ever the user starts the EHX application
    Matrix: The Matrix event logs are written to the EHX PC, when ever the user starts the EHX application
    More like this

    CAN'T FIND YOUR ANSWER? CLICK HERE TO CONTACT SUPPORT


    This solution was provided by Clear-Com via a question submitted to us by customers like you. If you wish to share with us a new solution or update an old one, please follow this link..


    The information on this page is owned by Clear-Com and constitutes Clear-Com’s confidential and proprietary information, may be used solely for purposes related to the furtherance of Clear-Com’ business and shall not be disclosed, distributed, copied or disseminated without Clear-Com’s prior written consent. Click Here for Clear-Com's privacy statement.