|
POST
|
I assume you are using the IFeatureWorkspace interface to open the FeatureClass? This is pretty much instant in my experience, which suggests the problem is at the ArcGIS Server end. I don't know much about ArcGIS server but why not try your code to open a FeatureClass from a local file GeoDatabase. If your code executes faster then this would suggest a network issue or a bottle neck at the server end. May be someone else can offer advice?
... View more
09-02-2013
03:38 AM
|
0
|
0
|
844
|
|
POST
|
Mele, The Append geo-processing tool should honour any existing selection. I think you need to provide the Append tool TableViews or FeatureLayers as the inputs which have the selection rather than the underlying table/featureclass. Duncan
... View more
09-02-2013
03:27 AM
|
0
|
0
|
584
|
|
POST
|
I have yet to develop an engine application but I know one needs to initialize ArcObjects as the first thing you must do before calling any ArcObjects, have you done this? Look on the forums for IAoInitialize. Whilst searching I found references to Binding to RuntimeManager not sure if you need to do that to?
... View more
08-23-2013
03:56 AM
|
0
|
0
|
1235
|
|
POST
|
Are the fields of different type? Are you trying to join a string field to a numeric?
... View more
08-22-2013
07:34 AM
|
0
|
0
|
1235
|
|
POST
|
OK had a look at your code and you were getting the enumerate from the wrong layer. But I found reading your code a bit out of sync so whilst trying to understand I re-jigged and simplified so its easier. Also put some comments in! I had to fake some data to make it work (selected points selecting polygons) and I use different layer names and positions so this code does not replace your existing code. You need to look at this and see the key changes to understand where you were going wrong. Public Sub SelectSchoolDistrict() Dim pMxApp As IMxApplication Dim pMap As IMap Dim pMxDoc As IMxDocument Dim pActiveView As IActiveView Dim pEnumFeature As IEnumFeature Dim pFeature As IFeature Set pMxApp = Application Set pMxDoc = Application.Document Set pActiveView = pMxDoc.FocusMap Set pMap = pMxDoc.FocusMap ' Get first layer and the selected ID's Dim pFeatureCursor As IFeatureCursor Dim pFeatureSelection As IFeatureSelection Dim pSelectionSet As ISelectionSet Dim pFeatureLayer As IFeatureLayer Set pFeatureLayer = pMxDoc.FocusMap.Layer(0) ' A point layer Set pFeatureSelection = pFeatureLayer Set pSelectionSet = pFeatureSelection.SelectionSet Dim pEnumParcelIDs As IEnumIDs Set pEnumParcelIDs = pSelectionSet.IDs ' Load selected points into geometry bag Dim pGeoColl As IGeometryCollection Set pGeoColl = New GeometryBag Dim pPoint As IPoint Dim id As Long id = pEnumParcelIDs.Next Do While id <> -1 Set pFeature = pFeatureLayer.FeatureClass.GetFeature(id) Set pPoint = pFeature.Shape pGeoColl.AddGeometry pPoint id = pEnumParcelIDs.Next Loop Dim pGeom As IGeometry Set pGeom = pGeoColl ' Get layer Dim pISDLayer As IFeatureLayer Dim ISDcount As Integer For ISDcount = 0 To pMap.LayerCount - 1 Set pISDLayer = pMap.Layer(ISDcount) If pISDLayer.Name = "Display Index" Then ' A polygon layer Exit For End If Next Dim pISDfSel As IFeatureSelection Set pISDfSel = pISDLayer ' Create spatial filter Dim pSpatialFilter As ISpatialFilter Set pSpatialFilter = New SpatialFilter With pSpatialFilter Set .Geometry = pGeom .GeometryField = "SHAPE" .SpatialRel = esriSpatialRelWithin End With ' Do selection and refresh map pISDfSel.SelectFeatures pSpatialFilter, esriSelectionResultNew, False pActiveView.Refresh End Sub
... View more
08-22-2013
06:56 AM
|
0
|
0
|
995
|
|
POST
|
Mark, Whilst us developers welcome your shared code (its always good to see how others do things) this is not the place to share code. You want to be uploading it to the code gallery along with any supporting documentation\metadata. Duncan
... View more
08-22-2013
05:57 AM
|
0
|
0
|
795
|