|
POST
|
Have you tried setting the feature to nothing after you are done with it?
... View more
06-18-2010
12:32 PM
|
0
|
0
|
2283
|
|
POST
|
The key is the type of search being done. That is defined by the spatial relationship in the spatial filter. Replace this line spatialFilter.SpatialRel = ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelEnvelopeIntersects with spatialFilter.SpatialRel = ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelIntersects
... View more
06-18-2010
12:27 PM
|
0
|
0
|
471
|
|
POST
|
The Interface Ifeaturelayer doesn't have any properties or methods of its own. Therefor the implementation of ILayer on your base layer is sufficient to implement IFeatureLayer on FeatureLayer. Typically an interface inheritance is done to provide extra methods and properties. If you add another property on IFeatureLayer, you will see what happens.
... View more
06-18-2010
11:07 AM
|
0
|
0
|
1815
|
|
POST
|
The properties as part of the ICommand implementation are readonly. The fields or member variables in the base class are read-write and protected. That means you can change them in a derived class. This is what you do in the constructor of the class when you use the ArcGIS wizard to create a command. You could make your own custom properties (not part of the Icommand) and name them whatever you like and set the fields in the base class in those properties. Not sure how ArcMap will react though. Good luck!
... View more
06-18-2010
06:19 AM
|
0
|
0
|
992
|
|
POST
|
The behaviour you are talking about sounds like polymorphism which is an object oriented concept. This is acheived in ArcObjects using interfaces. When you are querying interfaces between ILayer and IFeatureLayer you are still dealing with the same object (e.g. FeatureLayerClass instance.) The interface is just a standard way of interacting with the class, also called a contract. If you look at all the classes that implement ILayer, many of them do not implement IFeatureLayer. Query interface between ILayer and IfeatureLayer for a GroupLayerClass would fail because IFeatureLayer is not implemented on that class. You can do the same in VB.NET, you need to define your own interfaces, then implement those interfaces in your classes. You can also do class inheritance with abstract classes (mustinherit) and inherit the class in derived classes. Class inheritance works a little differently than interface implementation so I suggest you take a look at both. Object Oriented design can help make better applications there are many books and articles about it geared specifically to the VB.NET language.
... View more
06-18-2010
05:29 AM
|
0
|
0
|
1815
|
|
POST
|
I think there is some confusion here. 1. There is no such thing as an ILayer object. ILayer is an interface. There is a class FeatureLayer that can be cocreated (new) into an object. The FeatureLayer class implements the ILayer interface. The FeatureLayer also implements the IfeatureLayer interface that has a write property of featureclass. This is where you set a reference to your featureclass. The FeatureLayer class also implements an interface called Ifeaturelayerdefinition where you can put a where clause to filter the featureclass. 2. There a quite a few intermediate steps to setting a symbol to a point layer. I suggest looking and the SimpleRenderer class and the Create Picture Marker Symbol Snippet in the documentation. 3. SDO Geometry is a storage format for shapes in Oracle. IGeometry is an interface on geometry classes suchs PolygonClass, PointClass etc. An IGeometry is not a storage format. It is part of the arcobjects API that allows you to manipulate the geometry in memory. Arcobjects takes care of reading the SDO Geometry into memory and allows you access to that space in memory throught the IGeometry. There is no conversion possible since IGeometry is not a data format.
... View more
06-17-2010
07:28 AM
|
0
|
0
|
1375
|
|
POST
|
CurrentTool takes a ICommandItem not an ICommand. The ICommandItem has a reference to the command. I have never tried to create and OnCreate the commands myself, I don't think that is going to work. You need to let ArcMap create the command. James' way is how you get the command. I usually Initialize a variable and setting it to the currenttool in a seperate line, if something goes wrong it helps me know if the problem was finding the commanditem or setting it to the currenttool. Dim pUID As New UIDClass pUID.Value = "esriArcMapUI.SelectFeaturesTool" Dim selectFeatureCmdItm = m_pApp.Document.CommandBars.Find(pUID) m_pApp.CurrentTool = selectFeatureCmdItm
... View more
06-17-2010
07:02 AM
|
0
|
0
|
1218
|
|
POST
|
Sounds like you are doing a lot of things right from an ArcObjects stand point. IFeatureClassWrite or ITableWrite sound like a good bet now. Also you can try unversioning the featureclass if it is versioned. That will avoid the SDE delta tables overhead. If that is not an option, there is some tuning you can do on Oracle and SDE to make it faster, sounds like the bottle neck is AO though, not Oracle. You could also consider using the SDE APIs (C or Java) for bulk loading to by pass ArcObjects all together.
... View more
06-16-2010
06:13 AM
|
0
|
0
|
1880
|
|
POST
|
I have tried this but I don't think there is any way to make this work. I have ArcGIS desktop with a language supplement (french.) The language of the process is set off of the culture (not UI culture) from the local set for the OS. Once I start in french everything is in french and if I start in English, everything is in english. I had to adjust my own code so that my commands follow the same pattern. If you only want to make your custom commands change language, You might consider exposing the display member variables m_name, etc from the command class through a write property and find the command on the toolbar, cast it to your class (an abstact class derived from basecommand perhaps) and change it manually (from the database.) I have never tried this since it wourld not work on built in ArcGIS commands.
... View more
06-15-2010
12:14 PM
|
0
|
0
|
992
|
|
POST
|
Hi Chris, this isn't really an ArcObjects question, well at least my answer isn't. You can symbolize your layer in ArcMap based on quantities and a proportial symbol. So if you had a count field in your line feature class defined as a numeric field, you could use that as a quantity. Then you can set your min and max width and all that good stuff.
... View more
06-11-2010
12:31 PM
|
0
|
0
|
974
|
|
POST
|
Right off the bat seems like a problem with SDE or the RDBMS. Sounds like there is a buffer or temp table filling up or that has a max set on it. I am not really an SDE or Oracle guru but I would look in that direction.
... View more
06-11-2010
12:00 PM
|
0
|
0
|
1094
|
|
POST
|
This is what I did to work around this problem. I make a call to WorkaroundTabIndexDefect when my control becomes enabled (on start editing for me.) You will need to remove those handlers at some point too. Private Sub WorkaroundTabIndexDefect() For Each ctr As Control In Me.Controls SetKeyDownHandlers(ctr) Next End Sub Private Sub SetKeyDownHandlers(ByVal ctr As Control) Dim txtCtr As TextBox = TryCast(ctr, TextBox) If txtCtr IsNot Nothing Then txtCtr.AcceptsTab = True txtCtr.AcceptsReturn = True Dim evh As KeyEventHandler = New KeyEventHandler(AddressOf WorkaroundKeyDown) AddHandler txtCtr.KeyDown, evh Else ctr.TabStop = False End If If ctr.Controls.Count > 0 Then For Each subCtr As Control In ctr.Controls SetKeyDownHandlers(subCtr) Next End If End Sub Private Sub WorkaroundKeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Try If Me.ActiveControl IsNot Nothing Then Select Case e.KeyCode Case Keys.Return Dim btnCtr As Windows.Forms.Button = TryCast(Me.ActiveControl, Windows.Forms.Button) If btnCtr IsNot Nothing Then btnCtr.PerformClick() End If Case Keys.Tab If e.Shift Then Me.SelectNextControl(CType(sender, Control), False, True, True, True) Else Me.SelectNextControl(CType(sender, Control), True, True, True, True) End If End Select End If Catch ex As Exception Trace.WriteLine(ex) End Try End Sub
... View more
06-10-2010
06:46 AM
|
0
|
0
|
770
|
|
POST
|
The only way I know of creating an ArcObjects tool in the toolbox is to make it a DLL and implement IGPFunction. In Python you would use the Geoprocessing API which is a different API than ArcObjects. I don't know about using ArcObjects in python. The problem I could forsee is how to convert com objects from the ArcObjects API to gp objects. I have only seen arcobjects being used as a compiled code.
... View more
06-04-2010
12:10 PM
|
0
|
0
|
1381
|
|
POST
|
I don't think you can convert this. If you need to write a tool in vbscript to put in the toolbox, you would use the geoprocessing framework or api. The ArcGIS help (not developer help) has a lot of information (mostly python) on how to use the GP object and how to use GP cursors and geometries. You can write arcobjects api code and put it into the toolbox but you would need to write a dll that implements IGPFunction and IGPFunctionFactory. You cannot do that in VBScript. The function you describe seems possible to do within the GP api but you need to re-write the code against that API.
... View more
06-03-2010
07:43 AM
|
0
|
0
|
1381
|
|
POST
|
I suggest you turn options explicit on. this line has a spelling mistake Set pTopoOpeartor = pPolygonFeat.ShapeCopy Since you already instantiated pTopoOperator as a new polygon, your filter is technically ok but checking against an empty geometry. You don't need to instantiate the polygon if you are planning to assign it a geometry from shapecopy.
... View more
06-03-2010
06:57 AM
|
0
|
0
|
823
|
| 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
|