POST
|
Additionally, and after investigation, when we change the esriSelectionResultEnum from "Add to Selection" to"New", the performance increased 6 times (~1min). Thus, to narrow down the perfromance issue, it seems related to "Add to selection" option. However, the query requires this option. Any Advise!
... View more
01-18-2021
02:17 AM
|
0
|
0
|
1358
|
POST
|
Thank you for replying, hereafter are the details: we are using FGDB data, the Target Layer includes 700,000+ features, and the Source Layer includes 200,000+ features. using the "Select by Location" built-in tool in ArcMap takes ~1.5 mins; however, using the code we have provided above takes ~6.5 mins. After Debugging, more than 5.5 mins is delayed in the following line of code: pTrgtFeatureSelection.SelectFeatures(TryCast(pSFilter, ESRI.ArcGIS.Geodatabase.ISpatialFilter), SelectionType, False) it is very critical performance issue, and I need to select the features in that layer in order to perform additional queries (attributes & spatial). We are also trying to find another way/method than "SelectFeatures" to select the features in the Target layer, however still not sure if there is. Please help.
... View more
01-16-2021
03:41 AM
|
0
|
1
|
1392
|
POST
|
Hello All, We have just installed ArcGIS 10.1 and MS Visual Studio 10 to develop automation tools for select by attribute and select by Location. We developed a new add-in button in ArcMAP, and clicking it should do 4 queries, 2 of them are attribute queries and other 2 are spatial queries. order (1 attribute, 1 spatial, 1 attribute, 1 spatial) Suffering from very slow performance when using our code to perform the spatial queries. Please help!! Here after is the used code: Public Function p_GenSelectByLocation(ByVal SourceLayerName As String, ByVal TargetLayerName As String, ByVal Whereclause As String, ByVal SelectionType As esriSelectionResultEnum, ByVal RelationType As esriSpatialRelEnum) As Integer
Try
Dim pboolSrcFound As Boolean = False
Dim pboolTrgtFound As Boolean = False
Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.ActiveView.FocusMap.Layers(Nothing, True)
Dim pSrcFLayer As IFeatureLayer = Nothing
Dim pTrgtFLayer As IFeatureLayer = Nothing
Dim pLoopLayer As ILayer = pEnumLayer.Next()
pEnumLayer.Reset()
Do Until pLoopLayer Is Nothing
If TypeOf pLoopLayer Is IFeatureLayer Then
If pLoopLayer.Name = SourceLayerName Then
pSrcFLayer = pLoopLayer
pboolSrcFound = True
End If
If pLoopLayer.Name = TargetLayerName Then
pTrgtFLayer = pLoopLayer
pboolTrgtFound = True
End If
End If
If pboolSrcFound = True And pboolTrgtFound = True Then Exit Do
pLoopLayer = pEnumLayer.Next()
Loop
If pSrcFLayer Is Nothing Or pTrgtFLayer Is Nothing Then Exit Try
Dim pSrcFeatureSelection As IFeatureSelection = pSrcFLayer
Dim pGeomToUnion As IGeometryCollection = New GeometryBag()
If pSrcFeatureSelection.SelectionSet.Count = 0 Then Exit Try
'Get union of Geometry of all selected features
Dim pCursor As ICursor = Nothing
pSrcFeatureSelection.SelectionSet.Search(Nothing, False, pCursor)
If pCursor Is Nothing Then Exit Try
Dim pfeatureCursor As IFeatureCursor = pCursor
Dim pFeature As IFeature = pfeatureCursor.NextFeature
Dim pGeometry As IGeometry
pGeometry = pFeature.Shape
Dim pCount As Integer = 0
Do Until pFeature Is Nothing
pCount += 1
pGeometry = pFeature.Shape
pGeomToUnion.AddGeometry(pGeometry)
pFeature = pfeatureCursor.NextFeature
Loop
Dim pEnumGeometry As IEnumGeometry = pGeomToUnion
'Dim pgeometrybag As IGeometryBag = pEnumGeometry
Dim pResultGeom As ITopologicalOperator = Nothing
If pGeometry.GeometryType = esriGeometryType.esriGeometryPolyline Then
pResultGeom = New Polyline
pResultGeom.ConstructUnion(pEnumGeometry)
ElseIf pGeometry.GeometryType = esriGeometryType.esriGeometryPolygon Then
pResultGeom = New Polygon
pResultGeom.ConstructUnion(pEnumGeometry)
End If
If pResultGeom Is Nothing Then Exit Try
'define the spatial filter and select the features based on the union Geometry
Dim pSFilter As ISpatialFilter = New SpatialFilter
'If pTrgtFLayer Is Nothing Then Exit Try
Dim pnameOfShapeField As System.String = pTrgtFLayer.FeatureClass.ShapeFieldName
pSFilter.GeometryField = pnameOfShapeField
pSFilter.Geometry = TryCast(pResultGeom, IGeometry)
pSFilter.SpatialRel = RelationType
Dim pTrgtFeatureSelection As IFeatureSelection = pTrgtFLayer
pTrgtFeatureSelection.SelectFeatures(TryCast(pSFilter, ESRI.ArcGIS.Geodatabase.ISpatialFilter), SelectionType, False)
Return pTrgtFeatureSelection.SelectionSet.Count
Catch ex As Exception
pFuncReturnDebug(ex)
Return -1
End Try
End Function
... View more
01-15-2021
02:39 AM
|
0
|
4
|
1420
|
POST
|
Greetings, We have a project which requires implementation of ArcGIS for Desktop in order to host the geo-spatial data, and IBM Maximo to host the Asset management data. We need to integrate the two technologies in order to pull/push data from maximo to ArcGIS. Therefore, we need to know what ArcGIS licenses do we need to perform this task. Regards,
... View more
02-09-2018
02:30 AM
|
0
|
2
|
1053
|
POST
|
Greetings, I have downloaded "PyScripter-v2.5.3-x64-Setup.ex" and I`m using the Add-in Manager to add a command on a toolbar inside ArcMap 10.1... I succeeded in adding the toolbar and the command, however I need to show a Messagebox at the On_Click event of the command and I`m not able to do that...This is my code below: import arcpy import pythonaddins class ButtonClass1(object): def __init__(self): self.enabled = True self.checked = False def onClick(self): arcpy.AddMessage("TestMessg") print("text") pass Please help!
... View more
03-18-2014
02:28 AM
|
0
|
2
|
6659
|
POST
|
After posting this form, I tried to add the AxLicenseControl and I select ArcEngine license from the properties and everything went smooth... Thanks...
... View more
03-10-2014
06:37 AM
|
0
|
0
|
294
|
POST
|
Greetings, I`m trying to develop a form in vb.net 2010 that contains ArcEngine MapControl, TOCControl, & ToolbarControl in order to load a data in the map control and view it using the commands in the toolbar control... I used the following: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxTOCControl1.SetBuddyControl(AxMapControl1) AxToolbarControl1.SetBuddyControl(AxMapControl1) 'Add generic commands. AxToolbarControl1.AddItem("esriControls.ControlsOpenDocCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsAddDataCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add page layout navigation commands. AxToolbarControl1.AddItem("esriControls.ControlsPageZoomInTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPageZoomOutTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPagePanTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPageZoomWholePageCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add map navigation commands. AxToolbarControl1.AddItem("esriControls.ControlsMapZoomInTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomOutTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapPanTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapFullExtentCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomToLastExtentBackCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomToLastExtentForwardCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add map inquiry commands. AxToolbarControl1.AddItem("esriControls.ControlsMapIdentifyTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapFindCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapMeasureTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) End Sub At the runtime when I tried to load a geodatabase, and exactly when I tried to access a personal geodatabase I got the following error: "Couldn't connect to the database. Please validate the integrity of the database and/or your network connection and try again." Please advise !! Thanks in advance...
... View more
03-10-2014
05:29 AM
|
0
|
1
|
896
|
POST
|
Greetings, I`m using the Data Reviewer Extension in ArcMap 10.1 and I always run a batch Job inculdes many Domain checks and everything runs smoothly and the results always being written to the Reviewer Table successfully. However I need the checks to run only on specifed fields and not on all the fields of the data, so is there anyway to specify the fields to be checked or else is there a way to include the FieldName column in the Reviewer Table so that I can get the records of my specific fields only to generate my QA/QC report.. Please advise me on how to do this, and please specify if any other scenario that may lead me to a solution to my issue. Thanks in advance...
... View more
06-10-2013
01:23 AM
|
0
|
1
|
3901
|
POST
|
Thank you meikojosan, I think that you are right regarding issue #1. Regarding issue #2 I can say that even me I don`t have further details to send it to youbut what happens that when I run the batch process the ArcMap freezed and generate the described error only. So is there any way to get more details about this error? Thanks....
... View more
06-10-2013
01:04 AM
|
0
|
0
|
713
|
POST
|
Thanks meikojosan, I wonder why ArcMap is not managing this issue in a way that it should recommend the user to use File GDB as the workspace and not Personal GDB. Please not that after initiating two runs of the described Batch job in my 1st post, please check the results for each one: The results are written to the table but the following error genertaed for 5000 records: [INDENT]Unable to save Reviewer geometry for RecordID 4983 as its spatial reference is incompatible with Reviewer workspace spatial reference. Extent of geometry is outside the Reviewer Dataset XY domain.[/INDENT] The ArcMap Freezes then it generates error message with the following title: [INDENT]ArcMap has stopped working[/INDENT] Now I will go with your option and run this Batch without checking the Null Values and use the File GDB as the workspace. However, is there any hardware specs recommendation to run such a process successfully? Please advise..
... View more
06-03-2013
10:26 PM
|
0
|
0
|
713
|
POST
|
Greetings, I`m using the Data Reviewer Extension in ArcMap 10.1 and I always specify a personal GDB as the workspace. I create a Batch Job and include 7 Jobs of Invalid Domain & Null Values Check for 7 Point FeatureClasses with aprox. 180,000 Features all, then when I run this batch it starts running normally then it freezes for a long time and finally it generates the following error: --------------------------- Error saving records to the Reviewer Table --------------------------- External component has thrown an exception. --------------------------- OK --------------------------- Please advise me on how much the hardware specs should be to run this process successfully in normal performance for the above configuration, and specify if any other factor may lead to this issue. Thanks in advance...
... View more
06-03-2013
12:41 AM
|
0
|
4
|
2679
|
POST
|
Greetings, I am loading a personal Geo-database into ArcMAP 10.1 and I need to run some QA/QC tools/checks using the Data Reviewer. However when adding the DataReviewer toolbar it appeared disabled and after many tries it is still grayed out. I have the needed license installed. What I shall do tom make this running? Thanks in advance for any help received!
... View more
05-16-2013
12:00 AM
|
0
|
1
|
3863
|
POST
|
Greetings, I am new to Python but not new to ArcObject & .Net development. I just have a simple question that need some care from the Python developers if possible. I have two featureclasses loaded in ArcMap and each one of them has different fields names and different count of fields. What I need is to copy data from the 1st FC to the 2nd FC and allow the user to select fields from the 1st FC and map them with the corresponding fields in the 2nd FC and this is all using Python on ArcMap10.1. Please support me in this case ASAP. Thanks in advance...
... View more
04-22-2013
09:27 PM
|
0
|
1
|
861
|
POST
|
Greetings I have an application developed with Vb.Net 2005 and Crystal report XI used to preview many statistical reports. I always preview any report successfully, but when exporting any report that contains a Chart into pdf using the built-in export functionality in the report viewer control, the application freezes forever. While when exporting any report that does not contain any chart into pdf, it exported successfully and with no errors. So, I need to know if there is a some way / Solution / workaround that I could use to fix my issue and let my export process continue successfully. please can I have a little help over here... Please advise... Thanks in advance....
... View more
03-18-2012
08:51 PM
|
0
|
1
|
528
|
POST
|
As I mentioned before, you can use IWorkspace::DatasetNames to get the feature classes from a workspace. If your feature classes are inside feature datasets then use this method to get the feature datasets then loop through each dataset to get the feature classes. Hello Neil, I`m just wondering how I would do what you suggest, is there a way to get FeatureClasses inside a Dataset as you mentioned through code........because my FeatureClasses are all inside many Datasets...So I have to get the Dataset first then get all the FeatureClasses inside it..Is there any sample VB.Net code to do that...
... View more
03-10-2012
06:34 PM
|
0
|
0
|
1087
|
Online Status |
Offline
|
Date Last Visited |
01-18-2021
12:18 PM
|