CherSoft Ltd www.chersoft.co.uk Home   About   Advantages   Developer Reference   Downloads   FAQ   Contact

Chart Management

By Andrew Nibbs

Monday, April 18, 2005

Planned Change

We feel that this area of the SDK is a bit overcomplicated so we are going to simplify things. Next release (very soon!) will have management applications that you can just run from the command line (or programmatically) rather than needing to create any ENCX objects.

This change is in the last stages of testing.

Soon to be out of date information...

ENCX comes supplied with three chart management wizards - for ENC/S-57, ARCS and BSB formats - the wizards are packaged as standalone executable files which are launched by ENCX.

The library must first be pointed at the applications (which should be all in the same folder, C:\Program Files\ENCX SDK\Chart Management  on a development machine). This is done by calling SetInstallerParams on a library object. This call takes five parameters, firstly (and most important) the path to where the wizards (ManageARCS.exe, ManageBSB.exe and ManageENC.exe) are held. Next is a path to a help (.CHM) file and three held IDs.

  • Path to chart management EXEs,
  • Path and filename of help file,
  • Help ID for S-57/ENC,
  • Help ID for ARCS,
  • Help ID for BSB.

The actual wizards are launched with calls from the appropriate manager object - ARCS and BSB from a RasManager object, ENC from an S57Manager object.

The manager objects must be properly initialised to point at a SENC or RENC on disk.

ENCX.Library encx = new ENCX.Library();
encx.Construct("","");

encx.SetInstallerParams(@"C:\Program Files\ENCX SDK\Chart Management","",0,0,0);

ENCX.S57Manager man = new ENCX.S57Manager();

ENCX.S57ManagerInitialisationData init = new ENCX.S57ManagerInitialisationData();
init.PresentationLibraryFileName = @"c:\program files\encx sdk\redist\pslb03_3.dai";
init.SencPath = @"D:\charts\SENC"; // path to you chart folder (SENC)

man.OpenSenc2(encx, init);

man.InstallCells_ENC();

The above example is for the ENC management wizard. The appropriate calls (on a RasManager not S57Manager!) are

InstallCharts_ARCS

InstallCharts_BSB

Another thing to point out about the above example is that the online help won't work as no .CHM file or help ids were specified.

Andrew Nibbs has developed software and managed projects for Chersoft for 11 years. He specialises in C++ and does a bit of C# and even less VB. He once wrote a Python script.

ENCX Home