Method 'CoordinateSystem' of object '_DMap' failed.

Last Published: April 25, 2020

Error Message

When attempting to assign a ProjCoordSys object to the CoordinateSystem property of a Map or MapLayer object, the following error may occur:

Method 'CoordinateSystem' of object '_DMap' failed.


This error may occur if the ProjCoordSys object's Type property has been set equal to the Type property of another ProjCoordSys object. For example, code like this sometimes raises the error:

Dim mapPCS As New MapObjects2.ProjCoordSys
mapPCS.Type = Map1.Layers(0).CoordinateSystem.Type
Map1.CoordinateSystem = mapPCS

Solution or Workaround

Don't pass the Type property. Set the new ProjCoordSys object equal to the layer's ProjCoordSys explicitly. For example,

Dim mapPCS As New MapObjects2.ProjCoordSys
Set mapPCS = Map1.Layers(0).CoordinateSystem
Set Map1.CoordinateSystem = mapPCS

Article ID:000002141

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic