how to convert from layer to kml (kmz) in arcgis engine 9.2 using c#?

10-14-2011 06:17 AM
New Contributor
how to convert from layer to kml (kmz) in arcgis engine 9.2 using c#
hi for every one..
i'm sure i find the solution here.
i'm refered to use esri.arcgis.conversationTools nameSpace but , i didn't  see any class (such as Kml toLyer or toKml) that does the conversation.

my map is .mxd
the language i used is c# 2005.

i search more in google but no results
please help me..

thanx in advanced...
0 Kudos
2 Replies
New Contributor
no any replies

i want only  the entry point to start
does arcgis engine 9.2 support the conversion using c#?

please i need the help
0 Kudos
New Contributor
i finally find the solution
i write the code to help anyone want do this conversion 

this is the code (using c#) to convert layer to KML:

//convert layer to kml
                ESRI.ArcGIS.Geoprocessor.Geoprocessor GP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
                GP.AddToolbox(@"C:\Program Files\ArcGIS\ArcToolbox\Toolboxes\3D Analyst Tools.tbx");

                GP.SetEnvironmentValue("workspace", @"C:\Maps\Maps");

                GP.OverwriteOutput = true;

                IVariantArray parameters = new VarArrayClass();
               // assign  parameters       

                GP.Execute("LayerToKML_3D", parameters, null);
0 Kudos