Code required to Export XML Workspace to Feature Class

2012
4
11-05-2011 03:35 AM
Almuatasim_Ahmed_SaidAl-Hinai
New Contributor
Hi All,

I am looking for a VB.Net code to export XML workspcae to Feature Class. I am currently using ArcGIS 10 "Import XML Workspace Document" tool to do the conversion. But to do batch XML workspaces import, I am planning to build a customized script.

Any help is highly appreciated.

Thanks a lot.

Asim
0 Kudos
4 Replies
Almuatasim_Ahmed_SaidAl-Hinai
New Contributor
I used the ESRI .Net code for importing a dataset from XML document which is available at:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000mq5000000

I added a form with a button control on it and added the importing code on it with defining the paths for my xml doucment and my file geodatabase. But I got the following error in my Form1.Designer.vb:

Cannot embed interop type 'ESRI.ArcGIS.GeoDatabaseDistributed.IFeatureProgress_Event' because the source interface 'ESRI.ArcGIS.Geodatabase.IFeatureProgress' referenced by its ComEventInterfaceAttribute cannot be found.

I highly appreciate any help to solve this error.

Thanks

Asim
0 Kudos
NeilClemmons
Regular Contributor III
You shouldn't be embedding interop types for your ESRI assembly references.  However, this is indicative that you have targeted the .NET Framework 4.0 which is not currently supported by ESRI.  If you change your project to reference the .NET Framework 3.5 then the error should go away.
0 Kudos
Almuatasim_Ahmed_SaidAl-Hinai
New Contributor
Thanks Neil,
Changing the .Net framework solved my problem.

My Best Regards,

Asim
0 Kudos
StormwaterWater_Resources
New Contributor III
Just to document the steps:

VB.NET 2010 VS Express:
-Project menu
--YourProject's properties (at the bottom of the menu)
---Compile tab
----Advanced Compile Options button
-----Target Framework pulldown
0 Kudos