How to create the UnitsOfMeasure Object in C# Programming Language using GeoMedia WebMap v2015 and later?
With version 2015 of GeoMedia WebMap as well as with the 2015 version of the GeoMedia Desktop, the PCSS type library is no longer used. The product is now using the Common Coordinate System type libraries. Therefore, many if not all of the coordinate system objects will need to be created differently.
Here is how to create the UnitsOfMeasure object in a ASP.NET CSharp WebMap application:
The type library reference to add to have the UnitsOfMeasure object available in a program is a reference to:
"C:\Program Files (x86)\Common Files\Intergraph\Coordinate Systems SDK\3.0\Program\x86\Intergraph.CoordSystems.Interop.dll"
You will need to Browse for this file from the Add References Dialog in the Visual Studio Development Environment.
Code snippet:
mapServerManager = new MapServerManager(); var mapServer = (GWMMapServerHelper)mapServerManager.MapServer(""); UnitsOfMeasure uom; uom = (UnitsOfMeasure)mapServer.CreateObject("Intergraph.CCS.UnitsOfMeasure");