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


    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.


    This solution was provided to you by Clear-Com via a question submitted to us by customers like you. If your question wasn’t answered, you need help or you have a recommended solution for our database, please send us an email at support@clearcom.com

    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.