Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to write a C# console application to convert a CSV of Lat,Lon data into a Table using insert/update cursors. However, I am having the darndest time figuring out how to get a reference to an ITable without first opening an instance of ArcMap. How would it be done?

The purpose is to open a table inside a geodatabase that exists. After I have a reference to it, I can create an insert cursor and turn the CSV into a proper table inside the geodatabase directly without bothering with Access (the devil).

share|improve this question
    
Are you wanting to open the csv file as an ITable, or just the output table? –  Kirk Kuykendall Jun 9 '11 at 1:58
    
Just the output table. –  Nathanus Jun 9 '11 at 14:49
add comment

1 Answer

up vote 3 down vote accepted

I like the IGPUtilities interface. It has methods for opening feature classes and tables from an ArcCatalog-style path which can save you dozens of lines of code.

The one you probably want is the OpenTableFromString method.

This is assuming the table exists, of course. If you need to create it then I am sure it's a bit more involved.

share|improve this answer
    
When it asks for an ArcCatalog path, it's just referring to what can be seen in the address bar of ArcCatalog, right? –  Nathanus Jun 9 '11 at 14:13
    
Never mind, I figured it out! Thank you, this works perfectly. –  Nathanus Jun 9 '11 at 15:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.