|
POST
|
You can also loop through all the layers in the map. You can cast the each layer to IFeatureSelection if the layer implements that interface. You can then check each layer's selectionset for selected features. To my knowledge this is the only way to make sure you have the right layer since, as Neil mentioned, the same featureclass can be the source for more than one layer in the map and the map's featureselection doesn't link back to the layers, only the featureclasses.
... View more
12-02-2011
04:47 AM
|
0
|
0
|
1497
|
|
POST
|
Either the geometry doesn't have Z values, which it looks like it does or the target featureclass does not allow Z values. Can you check if the polygon featureclass allows for Z values? As far as the rest of your code, I think there are some inefficiencies. In ITinNode.QueryAsPoint there are some remarks about how it is faster than creating a new point in each iteration (you need to create your point before the loop) Secondly, creating, points, then lines, then rings, then polygons is probably not efficient. You can declare a new polygon, cast it to an IPointCollection, add the points to it, and user simplify on the ipolygon (inherited from IGeometry.)
... View more
12-01-2011
09:18 AM
|
0
|
0
|
1411
|
|
POST
|
The polygon extracted doesn't contain Z values, you have to apply them by overlaying it with the surface. It also concerns me that you are looping through all the triangles and calling extract polygon with the triangle and no filter and stop at edge false. That means that if your TIN is a continuous surface, you will get a polygon representing the entire surface for each call to extract polygon. If your intention is to create a triangular polygon for each triangle of the TIN, I think you are better off creating a new polygon for each triangle and adding the three nodes of the triangle as points to that polygon.
... View more
12-01-2011
05:51 AM
|
0
|
0
|
1411
|
|
POST
|
I have this requirement also, I wrote this prototype quickly in VBA, it seems to work. I am going to do it .net next. Without the save I was getting the same thing as Kevin.
Dim gxCatalog As IGxCatalog
Set gxCatalog = New gxCatalog
gxCatalog.ConnectFolder ("c:\")
Dim gxFile As IGxFile
Set gxFile = gxCatalog
gxFile.Save
... View more
11-28-2011
09:36 AM
|
0
|
0
|
672
|
|
POST
|
You do realize that ArcGIS 10 is the last release of ArcGIS to support VBA? In ArcGIS 10.1,esri is phasing out support for VBA. Migrating VBA from 9.3 to 10 is pretty much a dead-end.
... View more
11-24-2011
06:56 AM
|
0
|
0
|
2505
|
|
POST
|
I haven't done anything with add-ins yet, that is pretty interesting. You would still have to deal with message boxes and other text feed back sent to the users.
... View more
11-18-2011
11:36 AM
|
0
|
0
|
1373
|
|
POST
|
The registry key "HKEY_CURRENT_USER\Software\ESRI\UILANGID." has this information. This causes some grief because I use standard .NET resources and resources.fr. In ArcGIS 10, the process keeps the culture of regional setting but uses the language of the registry key. This is great for an application that needs to be switchable without changing the regional setting and affect other applications (as is our case.) On the other hand, it is difficult to predict when our code gets first used. In the extensions, commands and other components registered to be started by the ArcGIS application, you have to check if the uiculture of the process has been set to the same language as ArcMap, so .net can load your resources correctly. Then the question is do you really want to check the registry each time... You can alter the resources's code file, but it is auto-generated so any change there gets quickly overwritten. You can make your own resource manager. You can also make your own static uiculture checker/setter class. This leads to some convoluted code but is workable. In ArcGIS 9.3 it was worse because some strings used the regional settings, which is the culture of the process, while .net resources used uiculture; so you had to set the uiculture to the culture of the process. Date formats, decimal separators and all that are inherited from the system culture or regional settings. You can have the ArcMap language as French and keep the date formats as English.
... View more
11-18-2011
08:15 AM
|
0
|
0
|
1373
|
|
POST
|
the code is a little scattered but I do this in an extension in vb.net, principle is the same for c# class level member variable: Private m_PointObjectClassEvents As IObjectClassEvents_Event In a method called on start editing, if the featureclass is found 'LayerPoint previousle obtained m_PointObjectClassEvents = DirectCast(m_LayerPoint.FeatureClass, IObjectClassEvents_Event) AddHandler m_PointObjectClassEvents.OnChange, AddressOf PointChange Private Sub PointChange(ByVal obj As IObject) 'Maybe check some conditions Throw New ApplicationException("Message to the user") 'this abort the edit and the exception 'message is shown to the user End Sub In a stop editing event or other appropriate event RemoveHandler m_PointObjectClassEvents.OnDelete, AddressOf PointChange
... View more
11-18-2011
07:01 AM
|
0
|
0
|
1503
|
|
POST
|
the event listener needs to be on the class extension event for the feature class you are editing not the editor events.
... View more
11-17-2011
09:20 AM
|
0
|
0
|
1503
|
|
POST
|
the code does not belong in the license initializer. It should be added before the call to that. Since the project you linked to is 9.2 I suggest you read through and go through every step in the migrating to ArcGIS 10 document. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_migrate_ArcGIS_9_3_Desktop_and_Engine_stand_alone_applications_to_ArcGIS_10/0001000002ns000000/
... View more
11-16-2011
07:59 AM
|
0
|
0
|
1401
|
|
POST
|
The error says you need to bind to an ArcGIS product before you try to check out a license. Did you bind to the product? http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Bind_Method/004600000024000000/
... View more
11-16-2011
06:30 AM
|
0
|
0
|
1401
|
|
POST
|
Do you have service pack 3 installed? In my research I saw many fixes related to metadata in SP3.
... View more
11-04-2011
12:10 PM
|
0
|
0
|
728
|
|
POST
|
I converted a large desktop application written in vb.net to ArcGIS 10. It was mostly smooth with a few problem. I hear the metadata is a mess but our application doesn't rely heavily on that. The editor is all different, I had to switch back to the 9 way of editing until I can get all that sorted out. All that said, the application has to be ported, all the binding and licensing check stuff has changed. The language packs have changed. You can't just flip a switch and just have it work like 9.2 to 9.3. I found more problems going from 8.3 to 9.2, but that application was particularly bad.
... View more
11-03-2011
12:18 PM
|
0
|
0
|
477
|
|
POST
|
I don't remember the details of grouprenderer but you can look at ClassBreakRenderer, RepresentationRenderer, UniqueValueRenderer, etc. MO 2.0 is more than 10 years old so perhaps you could describe what the class does (I assume renders a layer on the map) or what you need to accomplish.
... View more
10-26-2011
06:12 AM
|
0
|
0
|
464
|
|
POST
|
the grid size depends on the size of your features. The spatial query typically uses the grids as a first cut to narrow down the candidate features. A grid size too big will result in too many features being evaluated. A grid size too small will result in too many grid cells that need to be pre-evaluated. There are guidlines for grid sizes in the help document and ways to evaluate them. Have you tried a file geodatabase rather than a a personal geodatabase. Also you should compact the geodatabase if there has been a lot of editing or if the data was loaded without placing the database in load only mode. Personal and file geodatabases have adds and deletes tables internally too. Other factors are at play such as the complexity of the search feature. Having a very complex feature can slow things down too.
... View more
10-25-2011
08:53 AM
|
0
|
0
|
1545
|
| 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
|