POST
|
Hi Roman, We have solution with 11 projects. Some of them have AddIns, some of them are helpers. All application works fine in folder C:\Program Files\xxxxxxxx. At first you need to clean up all copies of referenced dll from disk. After that each reference of your additional library you need to set “Copy to local” to True. Your library must be in the same solution as your AddIn. Next thing you need to setup project dependencies using “Building dependencies- Project dependencies”. Check each library your AddIn uses. Now each time when you build your project, your additional libraries will be built too. There is one problem with debugging. You can’t go from library to library and back, because your AddIn takes library not from your solution, but from AddIn zip file. So you can debug only StartUp project. Each time you change your additional library code, you need to go and rebuild your AddIns which uses additional library. To check is your additional library is included to AddIn , rename xxxx.esriAddinX to xxxx.zip file and check its content with your archiving software or go to AddIns folder, locate folder where your AddIn dll is stored and check if your additional dll library is stored in the same folder.
... View more
10-11-2018
10:58 PM
|
0
|
1
|
2830
|
POST
|
Hi, Your AddIn is zip file package which includes all referenced dlls. To add them automatically to zip in Visual Studio AddIn project dll reference properties set Copy to local property to True.
... View more
10-11-2018
04:57 AM
|
2
|
0
|
2830
|
POST
|
Hi Vivien, You must set output path of your results. I do not know which exactly geoprocessing tool you are going to use, but I will show you on Spatial Analyst Raster Calculator example: private static bool ExecuteRasterCalculator(string sExpression, string sOutRaster, Envelope pExtent, string sWorkspace, string sMaskRaster) { try { var gpresult1 = Task.Run(() => { var parameters = Geoprocessing.MakeValueArray(sExpression, sOutRaster); IReadOnlyList<KeyValuePair<string, string>> environments; environments = Geoprocessing.MakeEnvironmentArray(mask: sMaskRaster, extent: pExtent, workspace: sWorkspace); return Geoprocessing.ExecuteToolAsync("RasterCalculator_sa", parameters, environments, CancelableProgressor.None, GPExecuteToolFlags.AddToHistory); }); return !gpresult1.Result.IsFailed; } catch (Exception ex) { throw; } } Result raster will be stored on path sOutRaster. Geoprocessing.MakeValueArray parameters count and sequence depends on geoprocessing tool. For order and parameters look into your tool description
... View more
09-14-2018
12:40 AM
|
0
|
0
|
1221
|
POST
|
Hi, ArcGIS Pro geoprocessing has the same feature as ArcObjects does. Do not use flags GPExecuteToolFlags.AddOutputsToMap or GPExecuteToolFlags.Default and geoprocessing results will not be added to map. More information here: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geoprocessing
... View more
09-12-2018
10:38 PM
|
0
|
2
|
1221
|
POST
|
Hi Joon, If you use geoprocessing for your operation you do not need to create layer. Use Geoprocessing.MakeValueArray to construct parameters list. All parameters of Geoprocessing.MakeValueArray are object type so you can put featurelayer, featureclass or string path to your feature class. It will recognize automatically parameter type and will read required information.
... View more
09-12-2018
07:59 AM
|
0
|
4
|
1221
|
POST
|
Hi Husham, At first you need to install ArcObjects SDK 10.6.x on top of Visual Studio 2017. Open Visual Studio 2017. Select Project-New. In dialog select .Net Framework 4.5. Then go to Templates-ArcGIS-Desktop Add-ins-ArcMap Add-in. Alternative is to use Templates-ArcGIS-Extending ArcObjects-Class library (ArcMap). About differences you can read here: https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#25cf8397-3db8-4630-a3d3-f6147cf9f2f2.htm
... View more
09-11-2018
12:31 AM
|
1
|
0
|
595
|
POST
|
Hi Harald, I have looked at your code one more time and found that you are using code like this: return ArcMap.Editor.EditWorkspace as IVersionEvents_Event; Sequential calling of methods is the fast way to write code but is not the best on error handling and other cases. I would recommend to read EditWorkspace and save to class variable before returning. Return value of class variable. Then you would lock EditWorkspace object from releasing. On your class destructor, Dispose method or then you do not need it you can release EditWorkspace object
... View more
09-10-2018
04:27 AM
|
2
|
6
|
3642
|
POST
|
Hi, Why do you need to convert VB6 code? It could be run and on ArcGIS 10.6. We are still using old VB6 code in our application as part of code. You just need to edit ArcMap.exe.config file. Open ArcMap.exe.config (it is located in the same folder as ArcMap.exe), locate libraries you use in your VB6 project. Edit bindingRedirect part of each library you use like this: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="ESRI.ArcGIS.AnalysisTools" culture="" publicKeyToken="8fc3cc631e44ad86"/> <bindingRedirect oldVersion="9.3.0.0-10.6.0.0" newVersion="10.6.0.0"/> </dependentAssembly> </assemblyBinding>
... View more
09-09-2018
11:13 PM
|
0
|
2
|
595
|
POST
|
Hi Harald, You could get that type of error in code like this: public IRow ReturnRow() { IRow pRow = null; try { // Some code to create or get pRow return pRow; } catch() { } finally { Marshal.ReleaseComObject(pRow); } } Marshal.ReleaseComObject in finally section is the reason of "COM object has been separated from its underlying RCW" error. You will get exception at first using returned IRow object: IRow pRow = ReturnRow(); pRow.Delete(); // Here you will get exception IRow is just example. It could be every COM object. In your case it could be IWorkspaceEdit object.
... View more
09-07-2018
02:34 AM
|
0
|
8
|
3642
|
POST
|
Hi, I have tried the legend control with .geodatabase package and it works fine. At this time I found only one type of data which do not wont to work with legend control is ArcGIS server data (FeatureServer)
... View more
09-06-2018
12:15 AM
|
0
|
0
|
1536
|
POST
|
Hi, I have found problem location. I have loaded data from ArcGIS Runtime samples page https://developers.arcgis.com/net/latest/wpf/api-reference/html/E_Esri_ArcGISRuntime_UI_Controls_GeoView_LayerViewStateChanged.htm // Create Uri for feature layer var featureLayerUri = new Uri( "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Recreation/FeatureServer/0"); // Create a feature layer using url FeatureLayer myFeatureLayer = new FeatureLayer(featureLayerUri); myFeatureLayer.Name = "Feature Layer"; // Add the feature layer to map myMap.OperationalLayers.Add(myFeatureLayer); // Create a map point the map should zoom to MapPoint mapPoint = new MapPoint(-11000000, 4500000, SpatialReferences.WebMercator); // Set the initial viewpoint for map myMap.InitialViewpoint = new Viewpoint(mapPoint, 50000000); It works without setting visibility for legend and for layer. I have commented my layer visibility setting code, but it not helped. There are two differences how feature layer is created: 1. Different data source (ArcGIS server data and arcgisonline data) 2. I create FeatureLayer from ServiceFeatureTable, not directly from Uri. I have tried create FeatureLayer directly from Uri, but it not works. So Legend control does not work with ArcGIS server data
... View more
08-29-2018
05:23 AM
|
0
|
0
|
1536
|
POST
|
Hi, I have added LayerViewStateChanged event listening and got 3 events. One of them says that my Sites layer is not visible. Interesting that may background by event is not visible too, but I can see it. I have attached printscreens of event messages.
... View more
08-29-2018
04:51 AM
|
0
|
0
|
1536
|
POST
|
Hi, I would like to share my code by pieces. Xaml: public Map Map { get { if(_map == null) { _map = new Map(Basemap.CreateStreets()); AddLayers(); } return _map; } set { _map = value; } } // Create uri to the used feature service var serviceUri = new Uri("…"); // Create feature table for the pools feature service ServiceFeatureTable sitesFeatureTable = new ServiceFeatureTable(serviceUri); // Define the request mode sitesFeatureTable.FeatureRequestMode = FeatureRequestMode.OnInteractionNoCache; // Create FeatureLayer that uses the created table FeatureLayer sitesFeatureLayer = new FeatureLayer(sitesFeatureTable); sitesFeatureLayer.Name = "Sites"; sitesFeatureLayer.ShowInLegend = true; sitesFeatureLayer.IsVisible = true; // Add created layer to the map _map.OperationalLayers.Add(sitesFeatureLayer); I will try to check events you have mentioned and inform about results later.
... View more
08-28-2018
11:02 PM
|
0
|
0
|
1536
|
POST
|
Hi Jenifer, Thank you for your reply. Yes, I am using Xamarin.Forms. Height/WidthRequest did not solve the problem. I think that settings can influent legend view, but my problem is that I can’t see features on the MapView when I set legend.GeoView = mapView; It seems that is the bug which you have mentioned, but I am using MVVM and do not know how to change sequence of map creation and GeoView setting.
... View more
08-28-2018
03:10 AM
|
0
|
4
|
1536
|
POST
|
Hi, I use ArcGIS Runtime for Net with Xamarin. Legend or LayerLegend controls work fine on UWP, but does not work correctly on Android. I can see layers in my application, but all features from all operational layers are hided. If I comment in xaml legend part I can see all features. When I add operational layer I set each layer to be visible in legend and visible itself. I do not know is it possible to get checkboxes for visibility in legend controls. Maybe all my layer are invisible?
... View more
08-24-2018
03:57 AM
|
0
|
7
|
2004
|
Title | Kudos | Posted |
---|---|---|
1 | 11-17-2023 02:12 AM | |
1 | 2 weeks ago | |
1 | 3 weeks ago | |
1 | 4 weeks ago | |
1 | a month ago |
Online Status |
Offline
|
Date Last Visited |
Tuesday
|