Automate HxCfgFilConverter From Command Line

HXCFGFILLib.HxCfgFile has following functions

  • LoadFile - load from file
  • StoreFile - store ascii file
  • SerializeFile - store to binary file

you can use other functions to read or write value. Use the COM boject you can write a C# app simply with several lines as follow, I also write this tool, you can download it from githup

var cfg = new HxCfgFile();
cfg.LoadFile(@"pcr_L.rck");
cfg.StoreFile(@"pcr_L.rck.txt", 0);
cfg.SerializeFile(@"pcr_L.rck.rck", 0);

I am not familiar with python, I tried to write code to use this COM, but failed. I think it is easier for you to do it in python.

import win32com.client
o = win32com.client.Dispatch("HXCFGFILLib.HxCfgFile")
o.LoadFile("4mlTF_L.rck")
o.StoreFile("4mlTF_L.txt")
2 Likes