|
POST
|
You're welcome. Please remember to click the Mark as Answer check.
... View more
08-08-2012
05:37 AM
|
0
|
0
|
1046
|
|
POST
|
I'm getting this when I select the object via mouse. But typing in the name with or without ".shp" gives me the same result. I've checked the ReplacingObject property and it's not being set to true. It gets set to true when I select an existing feature class in a geodatabase.
... View more
08-07-2012
12:21 PM
|
0
|
0
|
1425
|
|
POST
|
The first thing I did was check whether the code in the two applications was the same. And I'm testing them out on the same workspaces, so I am stumped as to why they're performing differently.
... View more
08-07-2012
12:00 PM
|
0
|
0
|
1425
|
|
POST
|
When I change it to GxFilterShapefiles, I'll get the replacement warning message. However, in another application using the same code (with GxFilterFeatureClasses), I get the warning for both shapefiles and feature classes in geodatabases.
... View more
08-07-2012
11:39 AM
|
0
|
0
|
1425
|
|
POST
|
In my code, I'm using the following code to save a feature class Dim pFCFilter As New ESRI.ArcGIS.Catalog.GxFilterFeatureClasses Dim pGxDialog As New ESRI.ArcGIS.CatalogUI.GxDialog pGxDialog.Title = "Save feature class" pGxDialog.Name = "" pGxDialog.ObjectFilter = pFCFilter If Not pGxDialog.DoModalSave(My.ArcMap.Application.hWnd) Then Exit Sub When I select a feature class that already exists in a file or personal geodatabase, I'll get the expected "The object named "X" already exists. Do you wish to replace it?" However, when I select a shapefile that already exists, I don't get that message. Why would I get this inconsistent behavior?
... View more
08-07-2012
11:05 AM
|
0
|
7
|
1574
|
|
POST
|
Also, the Flex 3.0 API requires the Adobe Flex 4.6 SDK or higher, which in turn requires at least Flash Player 11.1.
... View more
08-07-2012
06:00 AM
|
0
|
0
|
1046
|
|
POST
|
How about looping through the datasets in the workspace and seeing if the name ("YourFClass") is in there? I've tested this with an In-memory workspace. Dim pEnumDS As ESRI.ArcGIS.Geodatabase.IEnumDataset Dim pDataset As ESRI.ArcGIS.Geodatabase.IDataset pEnumDS = pWorkspace.Datasets(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTAny) Do Until pDataset Is Nothing If pDataset.Name = "YourFClass" then System.Windows.Forms.MessageBox.Show("Exists") Exit Do pDataset = pEnumDS.Next Loop
... View more
07-30-2012
11:26 AM
|
0
|
0
|
1056
|
|
POST
|
Have you thought about using the IGxDialog class to open the dataset? This way, you don't have to worry about getting the correct workspace and factory. Here's an example in VB.NET
Dim pGxDialog As New ESRI.ArcGIS.CatalogUI.GxDialog
Dim pFilter As ESRI.ArcGIS.Catalog.IGxObjectFilter = New ESRI.ArcGIS.Catalog.GxFilterShapefiles
Dim pSelection As ESRI.ArcGIS.Catalog.IEnumGxObject
Dim pGxObject As ESRI.ArcGIS.Catalog.IGxObject
Dim pFClass As ESRI.ArcGIS.Geodatabase.IFeatureClass
With pGxDialog
.AllowMultiSelect = False
.ObjectFilter = pFilter
End With
If pGxDialog.DoModalOpen(My.ArcMap.Application.hWnd, pSelection) Then
pSelection.Reset()
pGxObject = pSelection.Next
pFClass = pGxObject.InternalObjectName.Open
End If
... View more
07-30-2012
05:58 AM
|
2
|
0
|
1781
|
|
POST
|
This page shows the code on how to use the IQueryAttributes dialog
... View more
07-24-2012
08:58 AM
|
0
|
0
|
581
|
|
POST
|
A good place to learn how to work with C# and ArcObjects is in the Online help documentation. This page contains the code to list the fields and all their properties Here's how to add a field to a dataset. There are also a number of ArcGIS snippets available in Visual Studios, such as this one that opens a shapefile from a path and file name
... View more
07-23-2012
08:08 AM
|
0
|
0
|
1404
|
|
POST
|
Have you tried something like this (in VB.NET)
If TypeOf IFeature Is IComplexEdgeFeature Then
End If
... View more
07-18-2012
04:14 AM
|
0
|
0
|
1388
|
|
POST
|
Also take a look at the Sampling Desk Tool, available for both 9.3 and 10.
... View more
07-16-2012
11:47 AM
|
0
|
0
|
2655
|
|
POST
|
James, credit was given to Ken. Ken usually always figure out my problems, so I'm never shy to give him credits..haha! The WhereClause is fine. You need single quotes to query strings. The code doesn't produces an error, it just act like the query is always true, even when it's not. The snippet it will always return a cursor, whether something was found or not. If you want to do additional testing to figure out if the whereclause will return anything, you can do something like this. Public Function PerformAttributeQuery(ByVal table As ESRI.ArcGIS.Geodatabase.ITable, ByVal whereClause As System.String) As ESRI.ArcGIS.Geodatabase.ICursor Dim queryFilter As ESRI.ArcGIS.Geodatabase.IQueryFilter = New ESRI.ArcGIS.Geodatabase.QueryFilterClass() queryFilter.WhereClause = whereClause ' create the where clause statement if table.RowCount(queryFilter) = 0 then Return Nothing ' query the table passed into the function and use a cursor to hold the results Dim cursor As ESRI.ArcGIS.Geodatabase.ICursor = table.Search(queryFilter, False) Return cursor End Function
... View more
07-13-2012
07:26 AM
|
0
|
0
|
4015
|
|
POST
|
What kind of table are you working with? A table associated with a feature class? A separate table?
... View more
07-13-2012
05:55 AM
|
0
|
0
|
2342
|
|
POST
|
Use IStandaloneTableCollection. Something like this
Private Function GetTable(InTableName As String, pMap as IMap) As ITable
Dim pStTabColl As IStandaloneTableCollection
pStTabColl = pMap
For j as Integer = 0 To pStTabColl.StandaloneTableCount
If (pStTabColl.StandaloneTable(j).Name = InTableName) Then
Return pStTabColl.StandaloneTable(j)
End If
Next j
Return Nothing
End Function
... View more
07-13-2012
05:14 AM
|
0
|
0
|
2342
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|