|
POST
|
the enumGxObject has the object or objects you selected Dim gxobj As IGxObject = gxEnum.Next Debug.WriteLine(gxobj.FullName) FullName has the whole path with the directory gdb and dataset.
... View more
04-20-2012
05:29 AM
|
0
|
0
|
1957
|
|
POST
|
Yes, the GXDialog can do that. You need to set its object filters and show with open or save.
... View more
04-19-2012
11:59 AM
|
0
|
0
|
1957
|
|
POST
|
Correcting an ArcMap framework level change that occurred between ArcGIS 9.3 and 10. The attribute table window is no longer a data window but rather a dockable window. As a result, a different set of ArcObjects calls to the new ArcGIS 10 interface�??ITableWindow3�??using the .FindOpenTableWindows method is needed to get the ITableWindow object. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000035n000000
... View more
04-19-2012
11:56 AM
|
0
|
0
|
885
|
|
POST
|
All points are geometries, not all geometries are points. It is possible that the igeometry passed in is of a different type like line, polygon etc. if you write something like this, a failed cast will return null. ppoint = trycast( pGeometry, IPoint) If ppoint isnot nothing then 'do something else 'geometry is not point end if You may also consider using IGeometry.GeometryType
... View more
04-19-2012
05:38 AM
|
0
|
0
|
726
|
|
POST
|
Which object you use depends on what you are doing and how. The createfeature assigns the ObjectID of your feature right away and the createdfeaturebuffer does not get a ObjectId until the you insertFeature. What goes on in the database depends on the type of database and whether you have versioning. Store will commit any changes to the feature instance to the database. I would use createfeature and store but not with an insertcursor. I would only use createfeaturebufferm insertFeature and flush with an insert cursor to do a batch job. The flush as far as I can tell is only used for insert cursors. It commits all the changes at once. It is useless with the store method. What gets me is why do insertcursors, updatecursors and searchcursors all implement the same interfaces. You specifically have to handle them differently.
... View more
04-03-2012
07:53 AM
|
0
|
0
|
1851
|
|
POST
|
Of course it is all case by case but my point is reuse is just one of the things to think about when programming and it usually shouldn't be the first. I have worked for people who kept insisting on writing code with reuse in mind. In my opinion reducing code complexity is a much more important consideration, in most cases.
... View more
03-30-2012
12:30 PM
|
0
|
0
|
2162
|
|
POST
|
I would most likely copy/paste the tool so yes two or more copies. The problem I find is requirements change over time and functions need to be tweaked for various reasons. If the code is centralized in one function it makes it harder to follow someone else's or my train of though from a long time ago. I like to keep things simple in one class even if that means more code overall. It means you can move that class to another project without dragging 5 or 6 utility classes that contain hundreds of methods when you only need one in each... I just spent a day going through an ArcObjectsUtil class that had 6000 lines of code done by another programmer that is not here any more. I found out that 70% of the methods weren't called by anything any more. Meaning that we had almost 4000 lines of code being maintained and cluttering up the project for no good reason. Some of the code was to convert one type of list to another, 1 line of code with a lambda expression with Framework 3.5... Reusability is fine but there are specific ways of doing it such has inheritance or class extensions that make it work nicely but you have to think of the poor guy coming after you, is he/she going to be able to make any sense of it...
... View more
03-30-2012
08:09 AM
|
0
|
0
|
2162
|
|
POST
|
There are some different philosophy and reusability. The advantages a real and it makes sense in some cases but there are disadvantages too. If the code is only a few lines, the probability of error in the code is low so the fixing it one place fixes all is not always applicable. There is also the risk of changing one function breaks all the others... If your code is crashing ArcMap, you need to put exception handlers in it. Any event called by ArcMap (ie any implementation of ArcObjects interfaces) should have exception handlers.
... View more
03-30-2012
07:06 AM
|
0
|
0
|
2162
|
|
POST
|
Your new location tool would have its' own onMouseDown implementation where you would put that same code in it. The method is designed to be invoked by ArcMap when you mouse down on the map with your tool. You could write a static method that took in the mouseenventargs and the screendisplay as arguments and returns a point, but I don't think it is worth it. It is only a few lines of code and making a new function for it seems like a hassle. In my opinion code reuse is rarely worth the trouble and modularity in code is much more handy even if it means writing a few lines of code over and over. If you really want to, you can make an abstract class that implements mouseenventargs and the tool interface and then inherit the class, but to me that seems like using a cannon to go after flies.
... View more
03-29-2012
09:48 AM
|
0
|
0
|
2761
|
|
POST
|
Foreground is used to draw directly to the display with the IDisplay. You can do some neat things with it but the elements are gone on the next refresh (unless you draw in the after refresh event.) I used it with engine to make a custom edit tool at 9.3. I doubt it has any thing to do with this problem.
... View more
03-29-2012
05:19 AM
|
0
|
0
|
1290
|
|
POST
|
Are you apply the query filter, do you define the where clause with the table names qualified for the fields? If you look at the displayselectionset from the IDisplayTable, are there any rows selected?
... View more
03-26-2012
06:54 AM
|
0
|
0
|
1290
|
|
POST
|
The file geodatabase is not designed to do that. It is designed do handle multiple readers and one editor. RDMS geodatabase are specifically designed to do that and esri has SDE for that. I am not sure what the status for multi-editor on a sql express geodatabase, technically it should work but it may have been clamped down to push users towards ArcGIS server solutions.
... View more
03-26-2012
06:48 AM
|
0
|
0
|
1062
|
|
POST
|
Strange. Are you defining the unique value renderer and the custom selection symbol in your code? If you back up and set the layer's symbology and selection symbol in ArcMap (if available) for example and load the lyr or mxd in your engine application, do you get the same problem? Do you get the problem with the selection not drawing in ArcMap too. What if you use a simple symbol for the selection, do you get the same problem?
... View more
03-21-2012
01:02 PM
|
0
|
0
|
1290
|
|
POST
|
Have you raised the selection changed event? If the selection is done on the featurelayer it is the IFeatureSelection.SelectionChanged method.
... View more
03-21-2012
11:36 AM
|
0
|
0
|
1290
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2024 10:26 AM | |
| 1 | 07-05-2024 08:45 AM | |
| 1 | 10-05-2022 02:19 PM | |
| 6 | 03-27-2017 01:16 PM | |
| 1 | 05-05-2016 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
07:37 AM
|