Hi Bob,
So you want to use the form to add the point? Does your form contain something like a lat/long text box and you want to enter that text in the form and translate that to a point in the point shapefile? I'm assuming your shapefile has a WGS 84 type of projection? How do you handle typos in the form?
Can you post the link to the C# example and maybe we can help translate.
I don't know your workflow, but sometimes people create a tool that lets the user interact with the map, and when the click event happens to place the point, a form will appear to enter the other non-spatial attribute data. Much like the way ArcMap does point editing.
Yes I want to be able to add points to an existing shape file from a VBA form. Yes it is WGS84. Not trying to trigger on an event, I simply added a macro to my toolbar and when I press it the form pops up. From this form I simply want to be able to add a point feature and fill in some attributes. I havent got as far as error checking and am assuming coordinates are correct. Just looking for a very basic start here.
Bob
There is one other thing you need to consider, how your user interacts with the data on the screen. So you've got a bunch of points on a map, how would they select them? It would be the selected point that they would want to attach the extra information to. Unless it's some sort of bulk update and information you want applied to ALL bomb sites.
If you need to add information to individual sites then the most sensible way is for the user to say draw a rectangle over the point and that selects it then the form opens up and then can fill in the details.
I think a less efficient way would to select the point by attribute but that would require the user to know some pre-existing ID.
As you mentioned VBA, you are wanting to use UIToolControl for that. But ESRI are phasing out support for VBA so in the long term you'll be shooting yourself in the foot. You could use the new python addin tools or develop it as a VB .net AddIn
Duncan
Bob,
When you say you'll be upgraded to 10 do you mean 10.0, 10.1, 10.2 or 10.2.1? I think the python addin tools came in in version 10.1. Have a look at this to see how to develop a tool.
So to get it crystal clear in my mind you have a csv file you import which has for example 10 points with various information, then you want to add mission data, this would be exactly the same for every point? So in effect you are adding a new field lets say its called "mission notes" which is of type string and you populate that with some mission related information? You would need to export the XY event layer to a separate FeatureClass so you could add extra fields.
Well you could create a very simple model that adds a field and inserts the text. If you expose the inputs as parameters then this will look and behave just like any other geoprocessing tool. Creating model tools is discussed here. This would require zero programming.
Duncan