|
POST
|
A command cannot have focus unless it is also a tool. Commands are one click kind of deals, they don't have any focus. When you click on your command and the form pops up, the current tool is still the previous one. Now what you do when the form is open is up to you. If the users are not to have any interaction with arcmap, make the form modal, this will prevent focus from shifting from the form back to the map. If that is not your goal, you can also set the current tool to the select elements tool, it is a de facto default tool.
... View more
09-28-2011
07:40 AM
|
0
|
0
|
1045
|
|
POST
|
The featureclass class implements the IGeodataset that has an extent property, is this what you are looking for?
... View more
09-23-2011
08:29 AM
|
0
|
0
|
449
|
|
POST
|
Something like this should work: Public Function createDBF(strName As String, strFolder As String, Optional pFields As IFields = Nothing) As ITable But Optional parameters are considered bad form, overloading the function is cleaner: Public Function createDBF(strName As String, strFolder As String, pFields As IFields) As ITable
'Do stuff
End Function
Public Function createDBF(strName As String, strFolder As String) As ITable
Dim defaultFields as IFields = Nothing 'Can change this to a real set of fields if necessary
return createDBF(strName, strFolder, defaultFields) 'Call the function with the default value
End Function
... View more
09-21-2011
08:20 AM
|
0
|
0
|
686
|
|
POST
|
Perhaps you could explain what task you are trying to do. Are you trying to set the EditLayers.CurrentLayer?
... View more
09-19-2011
11:04 AM
|
0
|
0
|
524
|
|
POST
|
From the ArcObjects help on IName.NameString: "The NameString property is reserved for future use. When implemented, it will return a string representation of the locational component of the name object that may be persisted by applications." Just because the namestring property is null doesn't mean your name object is null or invalid. The property is just not implemented.
... View more
09-19-2011
05:56 AM
|
0
|
0
|
304
|
|
POST
|
Is the slow part the First call to nextfeature or every call to next feature? My experience, after running rdbms traces on feature cursors using only attribute clauses, the database (oracle in my case) parses the query when search is called. The query is actually executed when the first nextfeature is called. The search was fast but it wasn't really doing the query, just preparing the cursor with the right fields and parsing the query to make sure it was valid. The first call to nextfeature was very slow and the trace showed that is where the query was done. I would expect different spatial queries to have different performance since the nature of geometric operation varies. One trick to speed things up is to look at your spatial index on the featureclass, it may need some adjustments. It also depends on the geometry type SDE and Oracle will have SDO geometry and ST geometry, spatial queries don't perform the same for both.
... View more
09-14-2011
05:02 AM
|
0
|
0
|
1101
|
|
POST
|
My understanding is 10.1 will offer limited support for VBA. What exactly does limited mean? In ArcGIS 10, there is limited support, however once you acquire the VBA license, you still have the embedded VBA environment in ArcMap (and the other applications too.) You also have the VBA help. My understanding is, in ArcGIS 10.1, you will still need to get the VBA license and you will still be able to execute VBA code all be it with limited support, presumably through custom commands or events. My question is, in ArcGIS 10.1, will there still be a VBA editor in ArcMap or not? If your code runs, hooray but if not will you be hooped because you cannot edit it? It says no VBA SDK, presumably that means no help, no samples, no templates, does it mean no vba editor?
... View more
09-09-2011
01:06 PM
|
0
|
0
|
2189
|
|
POST
|
Hi, What you don't mention is what the query filter looks like, are you doing a whereclause? Based on the description of the problem it sounds like and SDE/RDBMS problem. You didn't mention what RDMS or what version of SDE. Complex whereclause + SDE (especially with mismatch version) + RDMS (especially unsupported patches) can lead to this kind of problem. Make sure your database is patched and matches supported versions of SDE and that SDE is patched too. If all the versions line up, you will probably have to turn tracing on the RDBMS to track down the problem. I have seen queries go from 5 seconds to 5 minutes because of the Oracle optimizer choosing the wrong path. 24h seems like something broken on the SDE side. You may need to rebuild indexes and other SDE cleanup/administration tasks (I am not an SDE expert.)
... View more
09-09-2011
09:14 AM
|
0
|
0
|
1223
|
|
POST
|
Have you looked at IDocumentEvents.BeforeCloseDocument? You can also close the dockwin on opendocument, at the start of the session instead of at the end.
... View more
09-08-2011
06:14 AM
|
0
|
0
|
670
|
|
POST
|
Framework 4.0 is currently not supported, suggest you change your project to work against Framework 3.5. Also based on the error and the highlighted error you mentioned previously, the compiler may be confused between class names and variable names. RasterWorkspace is a class name and you are using it as a variable name, that is usually considered bad form. In that case there is no way for the compiler (vb is case insensitive) to tell if you are calling a static method on the class or an instance method on the interface. It usually defaults to variable over class but maybe not this time.
... View more
09-08-2011
05:23 AM
|
0
|
0
|
378
|
|
POST
|
Ok, well in the sample code you had opened the rasterdataset, that is a good start. If you look at the developer help for Irasterdataset, you will notice this is an interface on the rasterdataset class. So you actually have a rasterdataset object, you are just grabbing it through its IRasterDataset interface. If you look at the rasterdataset class (not interface) you will notice it implements IGeodataset as well as IRasterDataset, and IGeodataset has an extent property. So you need to cast your IRasterDataset variable to an IGeodataset variable. dim geoDs as IGeodataset = directcast(rasterdataset, Igeodataset) Then access the extent property and you have everything you need.
... View more
09-07-2011
11:14 AM
|
0
|
0
|
1366
|
|
POST
|
The extent of the rasterinfo is an IEnvelope. Are you using vba or vb.net? RasterInfo might be a little more than what you need. The .net help has an example on how to get it from one of the raster bands. If all you need is the corner coordinates from the rasterdataset, it might be easier to type cast (directcast in vb.net) that to an IGeodataset. IGeodataset has a property called extent which also happens to be of a type IEnvelope. This is all read only of course, editing a raster is whole different thing.
... View more
09-07-2011
10:57 AM
|
0
|
0
|
1366
|
|
POST
|
Antonic is correct esriSpatialRelIntersect will return the right line. However this seems like a very inefficient method. If each point is on one and only one line, I would recommend a spatialjoin. You only have to set it up once and then you can iterate through all the features and get the line objectID.
... View more
09-07-2011
07:42 AM
|
0
|
0
|
660
|
|
POST
|
Hi there, Neil's method of getting the ObjectId is probably optimal if the featureclass is not being edited at the time. If it is you can probably do a search on the IfeatureLayer with a QueryFilter where objectid > theSelectedObjectID, get the first feature in the cursor and use that id. As far as making the selection, I suggest you use IfeatureSelection.Clear, IFeatureSelection.SelectionSet.Add(ObjectId) and Call IfeatureSelection.ChangeSelection. if you have no query definition and you have a very large featureclass (hundreds of thousands of records), it might actually be more efficient, to find the objectID from the selection (ISelectionSet.Ids), increment it can call IfeatureClass.GetFeature, trap the exception and keep going until you find a valid feature. Keep in mind error trapping in .Net is usually not efficient and to be avoided. However, this might be faster than running queries on very large tables.
... View more
09-07-2011
06:38 AM
|
0
|
0
|
2930
|
|
POST
|
I have never got relative paths to work in the start external program in VS2003, 2005 or 2008. You need absolute path. But Neil is right, we keep the .suo as an external file to our source control and everything is ok. Plus the suo contains other things you usually don't want to share (compile type for example is usually debug on developer machines but could be changed to release.)
... View more
09-02-2011
07:58 AM
|
0
|
0
|
615
|
| 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
|