GPX to Features - VB.NET

1030
4
Jump to solution
11-06-2013 06:32 AM
deleted-user-VeC5jUIlNXtq
Occasional Contributor III
Hey all,

I'm wondering if there is any way I'm able to run the Conversion tool "GPX to Features" directly from VB.NET?

I've had very little luck finding anything.

I'm interested in something along the lines of the ESRI sample code for VB.NET buffer analysis replaced with GPXToFeatures.

Do I need to access Python first and then run the tool? It will be part of a larger VB.NET conversion process to a feature class in a FGDB.

Any sort of input or guidance would be greatly appreciated.

Thanks!

Edit: I guess technically it is part of geoprocessing tools...so it should be accessible through the above mentioned method?
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor
Yes, you should be able to execute any tool in the Geoprocessing toolbox like that. I've always used the syntax used in the "Executing a system tool with managed assembly" section.

However, I'm surprised that the GPXToFeature tool isn't in the ArcObjects API reference (like this one for FeatureToRaster). Then again, none of the toolboxes after DataManagementTools are showing up, either.

View solution in original post

0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor
Yes, you should be able to execute any tool in the Geoprocessing toolbox like that. I've always used the syntax used in the "Executing a system tool with managed assembly" section.

However, I'm surprised that the GPXToFeature tool isn't in the ArcObjects API reference (like this one for FeatureToRaster). Then again, none of the toolboxes after DataManagementTools are showing up, either.
0 Kudos
deleted-user-VeC5jUIlNXtq
Occasional Contributor III
Thanks for the quick reply!

Also, thanks for the info...I definitely didn't even see/check that thread of info...but it's not there anyway...surprising.

Should be easy enough to run, I'll play around with it.

The only other question related to this matter is: this will likely be run hundreds of times with GPX files being scattered among different folders.

I didn't see any IGxObjectFilter relating to GPX files.

Do you know of either a filter that I could use the GxDialog to allow the user to navigate to the GPX (rather than the alternative of them manually finding the path and giving it to the program through a textbox), or a different dialog window entirely? Essentially what I would like is to allow the dialog window from selecting the GPX file as if the user was running the actual tool.
0 Kudos
KenBuja
MVP Esteemed Contributor
You could use the OpenFileDialog and specify the file type
0 Kudos
deleted-user-VeC5jUIlNXtq
Occasional Contributor III
Great thank you for the assistance!
0 Kudos