|
POST
|
Yes, you need to create parameters first:
IReadOnlyList<string> importParams = Geoprocessing.MakeValueArray(@"c:\data\sourcedata", @"\\data\operationaldata.sde", "*airports*.shp", "NO_SUBFOLDERS");
IGPResult result = await Geoprocessing.ExecuteToolAsync("intelligence.BatchImportData", importParams);
if (result.IsFailed)
{
MessageBox.Show("Unable to import", "Batch import");
return;
}
Parameters from documentation sample. Use yours. As I understand featureclass names will be created automatically from source names. After you can rename them.
... View more
10-24-2024
03:19 AM
|
0
|
0
|
3838
|
|
POST
|
Hi,
There is sample how to call python script from ArcGIS Pro. Sample is here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Geoprocessing/CallScriptFromNet
Another way is to make python tool from your script and call it as geoprocessing tool.
There are differences in arcpy used by ArcMap and ArcGIS Pro. Check Python section for performance issues.
In one of our projects we have found that performance issue could be with using featureclass instead of featurelayer in SelectLayerByLocation method when you call it in calculation cycle. You need to make FeatureLayer from FeatureClass before calculation cycle.
Data type for in_layer for SelectLayerByLocation method must be FeatureLayer, but it works and with FeatureClass.
... View more
10-23-2024
12:27 PM
|
1
|
1
|
2757
|
|
POST
|
Yes, You can call Geoprocessing.ExecuteToolAsync. Tool name will be "BatchImportData_intelligence". You need to have minimum Standard ArcGIS Pro license to use that tool.
... View more
10-23-2024
12:01 PM
|
0
|
2
|
3851
|
|
POST
|
Hi,
I have tested your piece of code in ArcGIS Pro 3.2 and it works in Dockpane and in PropertyPage. Could you share minimum code project to test? I think issue is in parent part of your xaml sample.
... View more
10-23-2024
11:55 AM
|
0
|
2
|
1540
|
|
POST
|
Hi,
I would like suggest you workaround I used in my case. I needed to update polygon feature with new geometry, but using EditOperation ConstructPolygons I got few polygons. So after Execute of operation I checked all results, selected one with my criteria, copied shape from new feature and made undo of last operation. After that I created new EditOperation and called Modify and Execute methods
... View more
10-23-2024
10:54 AM
|
0
|
4
|
2590
|
|
POST
|
Hi,
Have you tried to call geoprocessing tool Batch import data from you add'in? It can import GeoJSON to featureclass.
... View more
10-23-2024
01:18 AM
|
0
|
4
|
3875
|
|
POST
|
Hi,
Thread I have found is near your case. There is no answer from @UmaHarano about releasing new functionality.
... View more
10-21-2024
10:28 PM
|
0
|
0
|
1372
|
|
POST
|
You could check if exists unsaved manual edit and ask user to save them and try to start your tool/button again. We use that workflow in our applications.
Call HasEdits method from Datastore.
... View more
10-17-2024
10:55 AM
|
1
|
1
|
3832
|
|
POST
|
You don't need to copy all feature/row values to dictionary. You need fill dictionary with field values, you want to change, only. All other original field values will not be modified.
// Modify Node
updateDangleNodeAndLegShapes.Modify(nodesMapMember, selectedFeatures[nodesMapMember].First(),
new Dictionary<string, object>() { { "SHAPE", newNode }, { "NodeClass", "testing_addin" } });
// Modify NodeLeg
updateDangleNodeAndLegShapes.Modify(legsMapMember as Layer, selectedFeatures[legsMapMember].First(), newLeg);
... View more
10-16-2024
10:40 PM
|
1
|
4
|
3856
|
|
POST
|
Have you tried to read current version before changing and save it for later using?
private ArcGIS.Core.Data.Version _fromVersion;
private Task ChangeToHistoricVersion()
{
// Before changing to historic version
_fromVersion = versionManager.GetCurrentVersion();
}
private Task ChangeToCurrentVersion()
{
// changing back to current version
MapView.Active.Map.ChangeVersion(historicalVersion, _fromVersion);
}
... View more
10-16-2024
11:09 AM
|
0
|
1
|
2748
|
|
POST
|
Hi,
Working with Inspector and EditOperation has some limitations.
All features loaded into the inspector must be from the same feature layer. Only feature values that are modified in the inspector are applied to the loaded feature(s). If tables are joined to the feature layer then the joined attributes are loaded also.
You can't use Modify and Inspector in cycle. Only last Modify will be executed. Your workflow must be like this: Load, Modify, Execute, Load, Modify, Execute... If you want to have possibility undo in one operation, you need to use CreateChainedOperation. I would recommend do not use inspector in your case. There are plenty of overloads of Modify methods which you could use for your workflow without inspector and execute all modifications at once.
More info about Editing here.
... View more
10-15-2024
11:11 PM
|
1
|
6
|
3888
|
|
POST
|
Hi,
There are no special courses. Visit developers.arcgis.com to get started. There are plenty of videos from Esri developer summit tech sessions on youtube or Esri media space
... View more
10-15-2024
10:33 PM
|
0
|
0
|
790
|
|
POST
|
Savint to lyrx:
LayerDocument layerDocument = new LayerDocument(layer);
layerDocument.Save(@"c:\Data\MyLayerDocument.lyrx");
Opening from lyrx:
//Note: Call within QueuedTask.Run()
var layerDoc = new LayerDocument(@"E:\Data\SDK\Default2DPointSymbols.lyrx");
var createParams = new LayerCreationParams(layerDoc.GetCIMLayerDocument());
LayerFactory.Instance.CreateLayer<FeatureLayer>(createParams, MapView.Active.Map);
Modifying existing layer symbology using lyrx:
private static async Task ModifyLayerSymbologyFromLyrFileAsync(FeatureLayer featureLayer, string layerFile)
{
await QueuedTask.Run(() => {
//Does layer file exist
if (!System.IO.File.Exists(layerFile))
return;
//Get the Layer Document from the lyrx file
var lyrDocFromLyrxFile = new LayerDocument(layerFile);
var cimLyrDoc = lyrDocFromLyrxFile.GetCIMLayerDocument();
//Get the renderer from the layer file
var rendererFromLayerFile = ((CIMFeatureLayer)cimLyrDoc.LayerDefinitions[0]).Renderer as CIMSimpleRenderer;
if (rendererFromLayerFile == null)
return;
//Apply the renderer to the feature layer
featureLayer?.SetRenderer(rendererFromLayerFile);
});
}
... View more
10-09-2024
12:40 PM
|
0
|
1
|
2565
|
|
POST
|
Lyrx is a pure text solution - xml:
{
"type" : "CIMLayerDocument",
"version" : "1.1.0",
"build" : 3219,
"layers" : [
"CIMPATH=map/meteoritesuk.xml"
],
"layerDefinitions" : [
{
"type" : "CIMFeatureLayer",
"name" : "MeteoritesUK",
"uRI" : "CIMPATH=map/meteoritesuk.xml",
"sourceModifiedTime" : {
"type" : "TimeInstant"
},
"description" : "MeteoritesUK",
"layerElevation" : {
"type" : "CIMLayerElevationSurface",
"mapElevationID" : "{D9EFA120-D6D6-4152-8711-6765DCCF05C5}"
},
"expanded" : true,
"layerType" : "Operational",
"showLegends" : true,
"visibility" : true,
"displayCacheType" : "Permanent",
"maxDisplayCacheAge" : 5,
"showPopups" : true,
"autoGenerateFeatureTemplates" : true,
"featureTable" : {
"type" : "CIMFeatureTable",
"displayField" : "NAME",
"editable" : true,
"dataConnection" : {
"type" : "CIMStandardDataConnection",
"workspaceConnectionString" : "DATABASE=.\\SDK.gdb",
"workspaceFactory" : "FileGDB",
"dataset" : "MeteoritesUK",
"datasetType" : "esriDTFeatureClass"
},
"studyAreaSpatialRel" : "esriSpatialRelUndefined",
"searchOrder" : "esriSearchOrderSpatial"
},
... View more
10-08-2024
10:59 PM
|
0
|
3
|
2582
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 06-30-2026 10:14 PM | |
| 1 | 06-30-2026 01:43 PM | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|