|
POST
|
You can use IFeatureWorkspace::CreateFeatureClass to save it. Here's an example (written for VBA, but easily transferred to .NET). There's also a snippet available in Visual Studios called "Create FeatureClass", but you'd have to modify it a bit since it saves the featureclass to a geodatabase.
... View more
07-13-2012
04:59 AM
|
0
|
0
|
1027
|
|
POST
|
But can you please explain your code to me? Thank you!!! Sure. In the first If statement, it checks if anything was entered in the qText and if so, it puts that into the Expr variable The next If statement checks if anything was entered in the countycb combobox.. If so, then if there is something in the Expr variable (meaning the first If statement was true), then it appends "AND County = '{countycb.selectedItem}'" to the variable. If not, it just puts "County = '{countycb.selectedItem}'" into the variable. Finally, the third If statement check if anything was entered in the industrycb combobox. If so, then if there is something in the Expr variable (meaning either of the first two If statement were true), then it appends "AND prim_bus = '{industrycb.selectedItem}'" to the variable. If not, it just puts "prim_bus = '{industrycb.selectedItem}'" into the variable.
... View more
07-12-2012
01:52 PM
|
0
|
0
|
3025
|
|
POST
|
I think what's happening is that you're adding a listener event every time you click the map but not removing them, so you've got more and more listeners responding to each click.
... View more
07-12-2012
01:34 PM
|
0
|
0
|
877
|
|
POST
|
An easier way would be to build the expression where you add in each component if it's selected. Here's one way (completely untested)
var expr:String = new String
if (qText.text != "") {expr = "Company Like '%{qText.text}%'";}
if (countycb.selectedItem != " ")
{
if (expr != "") {expr += expr + " AND County = '{countycb.selectedItem}'";}
else {expr = "County = '{countycb.selectedItem}'";}
}
if (industrycb.selectedItem != " " )
{
if (expr != "") {expr += expr + " AND prim_bus = '{industrycb.selectedItem}'";}
else {expr = "prim_bus = '{industrycb.selectedItem}'";}
}
... View more
07-12-2012
11:34 AM
|
0
|
0
|
3025
|
|
POST
|
The Intellisense choices show up as you start typing Protected and Overrides with different options as you select them. In fact, you don't even need to type in Sub...that will get added automatically when selecting such arguments as OnMouseDown. My screen capture program just doesn't catch the Intellisense context menu.
... View more
07-12-2012
11:01 AM
|
0
|
0
|
2542
|
|
POST
|
What's table do you want to perform this on? Here are some different ways to get a table. If you want an external table that you get via a path name, use
Public Function OpenTable(ByVal directory As String, ByVal TableName As String, ByVal Type As String) As ESRI.ArcGIS.Geodatabase.ITable
Dim pWS As ESRI.ArcGIS.Geodatabase.IWorkspace
Dim pWSFactory As ESRI.ArcGIS.Geodatabase.IWorkspaceFactory
Dim pFWorkspace As ESRI.ArcGIS.Geodatabase.IFeatureWorkspace
Dim pTable As ESRI.ArcGIS.Geodatabase.ITable
Try
If Type = "DBF" Then
pWSFactory = New ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactory
ElseIf Type = "File Geodatabase" Then
pWSFactory = New ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactory
ElseIf Type = "Personal Geodatabase" Then
pWSFactory = New ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactory
ElseIf Type = "SDE" Then
pWSFactory = New ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory
End If
pWS = pWSFactory.OpenFromFile(directory, 0)
pFWorkspace = pWS
pTable = pFWorkspace.OpenTable(TableName)
Return pTable
Catch ex As Exception
Windows.Forms.MessageBox.Show("Open Table error", ex.Message)
Return Nothing
End Try
End Function
For a table from an existing featureclass, use
Dim table as ESRI.ArcGIS.Geodatabase.ITable = CType(pFeatureClass, ESRI.ArcGIS.Geodatabase.ITable)
For a table you've selected in your content, use the Snippet "Get Selected Table in Contents View"
... View more
07-12-2012
10:30 AM
|
0
|
0
|
2338
|
|
POST
|
You're almost there. What you'll have to do is start typing in Protected Overrides Sub and you'll see the OnMouseDown, OnMouseUp, and other arguments show up in Intellisense. Select one and the rest of the sub is added. [ATTACH=CONFIG]16027[/ATTACH][ATTACH=CONFIG]16028[/ATTACH]
... View more
07-12-2012
10:09 AM
|
0
|
0
|
2542
|
|
POST
|
There could be a couple of things at issue. Is 'strColumn_Name' the name of the field or a variable that hold the name of the field? If it's a variable, then you should use pFDef.DefinitionExpression = strColumn_Name + "='" + myObject.ToString() + "'"; Is the field numeric instead of string? Then you would remove the single quotes from the string. I would suggest comparing the DefinitionExpression value (use the debugging mode to see what it is exactly) with the expression that works properly in ArcMap
... View more
07-11-2012
05:19 AM
|
0
|
0
|
2226
|
|
POST
|
You're welcome. If this helped, then please click the check mark to show the question has been answered.
... View more
07-10-2012
07:42 AM
|
0
|
0
|
1225
|
|
POST
|
Take a look here for some more editing samples. You can look here too, but you'll have to sift through them all to find add-ins. I have created an Editor Extension add-in that allows a user to create features and attribute them with a classification scheme using either the template or a dialog, but it's pretty complex.
... View more
07-10-2012
06:34 AM
|
0
|
0
|
1225
|
|
POST
|
The best place to start would be in the Help, which has several walkthroughs on building add-ins, plus several samples.
... View more
07-09-2012
12:23 PM
|
0
|
0
|
1225
|
|
POST
|
Have you tried using an IFeatureLayerDefinition? This will display only the selected features as determined by a definition expression (which should be the same syntax as the whereclause in your queryfilter)
... View more
07-06-2012
07:01 AM
|
0
|
0
|
2226
|
|
POST
|
Although you can cast an IRasterBand as an IGeodataset, only MosiacRasters, Rasters, RasterDatasets, and RendererRasters can implement ISaveAs. Can you use IRasterBand::Copy instead?
... View more
07-05-2012
09:46 AM
|
0
|
0
|
1283
|
| 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
|