mrivest

new AddLayersOperationClass error

Discussion created by mrivest on Feb 24, 2010
Latest reply on Mar 15, 2010 by jeremy_wright-esristaff
Hi,

I try to add a IBaseMapLayer using the sample from the documentation:

IRasterBasemapLayerFactory rasterBMLFactory = new RasterBasemapLayerFactoryClass();
IRasterBasemapLayer rasterBML = rasterBMLFactory.Create(rasterLayer);
ILayer layer = (ILayer)rasterBML;
layer.Name = layer.Name + " Accelerated";
IAddLayersOperation addLayersOp = new AddLayersOperationClass();addLayersOp.SetDestinationInfo(0, map, null);
addLayersOp.AddLayer(layer);
addLayersOp.Name = "Add Accelerated Raster Layer";
IOperation op = addLayersOp as IOperation;
op.Do(); // Add the layer.

But I got an error on creating AddLayersOperationClass: "ClassFactory cannot supply requested class ".

I also try to add the LoadVersion with Desktop and engine before, but I still got the error.

Is there an issue with the class?

I have ArcGIS Dektop / Engine / SDK .NET on my computer.

Thanks

Dominique

Outcomes