Developers Knowledge Base

Learn how to manipulate, modify, and tune your GeoMedia WebMap, Geospatial Portal and Consumer portal instances.
Showing results for 
Search instead for 
Do you mean 

How to create the UnitsOfMeasure Object in CSharp Programming Language using GeoMedia WebMap v2015?

by Technical Evangelist on ‎02-19-2016 07:47 PM - edited on ‎04-06-2017 05:06 AM by Technical Evangelist (589 Views)


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");