New GxLayer fails with ArcGIS Engine

2115
2
09-01-2010 05:58 AM
BerendVeldkamp
Occasional Contributor II
I have the following code:
GxLayerClass gxLayer = new GxLayerClass();
gxLayer.Path = layerFile;
On my development machine, I have both ArcView and ArcGIS Engine (version 10) installed. When I bind a license using  RuntimeManager.Bind(ProductCode.Desktop), things work as expected, but when I use RuntimeManager.Bind(ProductCode.Engine), the code breaks at the first line with a message Retrieving the COM class factory for component with CLSID {BDBBB40F-D0B2-11D1-AED9-080009EC734B} failed due to the following error: 80040111.

I can't find any evidence of Gxlayer not being included in ArcGIS Engine, but maybe someone can enlighten me?
0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
IGxLayer is only available in ArcGIS Desktop.  In the developer help, the topic for each interface and class has a Product Availability near the top of the page that lets you know what products are supported.

You can use ILayerFile to work with layer files in any of the products.
0 Kudos
BerendVeldkamp
Occasional Contributor II
Thanks Neil.

Even after 10 years of ArcObjects development one keeps finding classes never seen before.
0 Kudos