|
POST
|
It worked some time ago. So you could place CreateLayer in try/catch block and make return with message on exception: Item curItem = ItemFactory.Instance.Create(curService);
try {
Layer newLayer = LayerFactory.Instance.CreateLayer(new Uri(curService, UriKind.Absolute), activeMapView.Map, 0);
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
return;
} It is not elegant way but it works
... View more
09-23-2022
10:27 AM
|
0
|
0
|
1387
|
|
POST
|
Hi, Have you tried CanCreateLayer from LayerFactory? if (LayerFactory.Instance.CanCreateLayerFrom(currentItem))
LayerFactory.Instance.CreateLayer(currentItem, MapView.Active.Map);
... View more
09-23-2022
06:45 AM
|
0
|
2
|
1396
|
|
POST
|
Which line generates the error? There is no code for saving in your pasted code.
... View more
09-23-2022
05:33 AM
|
0
|
2
|
2300
|
|
POST
|
Project or check spatial references? To project use code like this: var sr = fcFeatureToVer.GetDefinition().GetSpatialReference();
...
FilterGeometry = GeometryEngine.Instance.Project(body, sr); To check spatial references place breakpoint near spatialQueryFilter add body and fcFeatureToVer to VS watch list and investigate
... View more
09-23-2022
04:04 AM
|
0
|
4
|
2306
|
|
POST
|
Hi, Somethimes spatial filter doesn't work if spatial references of FilterGeometry and FeatureClass differs. Then you need to reproject FilterGeometry
... View more
09-23-2022
03:49 AM
|
1
|
6
|
2312
|
|
POST
|
Hi, Have you tried PointCloudSceneLayer class? It has GetAvailableClassFlagsAndLabels method where you can read properties from one of your print screens. "Classification flag values provide a secondary description of the point cloud data (beyond their classification code). Flags include Synthetic, key-point, withheld, and overlap. Less common are scan direction and edge of flight line. Classification flags are used in a PointCloudFilterDefinition to filter which point cloud data is rendered (or not)" More info you can find here: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Scene-Layers
... View more
09-22-2022
10:39 PM
|
0
|
1
|
1771
|
|
POST
|
Hi, Have you tried to split sql statements to few ExecuteSQL parts and do not use ';' at the end of part?
... View more
09-21-2022
10:18 PM
|
1
|
1
|
2937
|
|
POST
|
Hi, If you want to set IsExpanded property then you need to use SetExpanded method.
... View more
09-18-2022
10:29 PM
|
0
|
0
|
928
|
|
POST
|
You can get minimum value of breaks from CIMRasterClassifyColorizer MinimumBreak property. I would recommend you to download from Esri git CIMViewer source code, build add-in for ArcGIS Pro and you can investigate each ArcGIS Pro CIM element you selected. I have found that CIMRasterClassifyColorizer has CIMRasterClassifyColorizer has property RoundingValue property which changes when you make changes from Symbology dockpane but I haven't tested it from code. Look at CIMViewer printscreen below
... View more
09-15-2022
10:19 PM
|
0
|
1
|
2178
|
|
POST
|
You can build simple bat file with OS commands or code executable using c#. Another way is to use configuration instead of add-in. It could remove add-in commands/tools from ArcGIS Pro UI. Check configuration samples on Esri Community samples git.
... View more
09-15-2022
08:50 AM
|
0
|
0
|
3945
|
|
POST
|
Hi, If you know old add-ins GUID's you can remove their folders from This PC > Documents > ArcGIS > AddIns > ArcGISPro folder. <AddInInfo id="{997969c2-c517-4481-af7e-dbdb0e20399c}" version="1.0" desktopVersion="2.0.0">
<Name>Custom Pop-up Tool</Name>
<Description>Show a custom pop-up.</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>ArcGIS Pro SDK Team, [email protected]</Author>
<Company>esri, http://www.esri.com</Company>
<Date>9/28/2015</Date>
<Subject>Map-Exploration</Subject>
</AddInInfo>
... View more
09-15-2022
05:56 AM
|
0
|
2
|
3978
|
|
POST
|
Hi, You can set class label as you want. It could be text, number or etc. Add code below after creating newColorizer: int index = 0;
var classBreaks = newColorizer.ClassBreaks;
foreach (var classBreak in classBreaks)
{
index++;
classBreak.Label = classBreak.Label + $"({index})";
} In my code I just added index of class to existing label. You can read class break values and format label as you wish. To change "Value" is impossible I think. It shows raster table field name used for class breaks. Workaround I can suggest is to create additional raster field and copy Value field values. But it could be difficult because raster table field names has similar rules as database table field name.
... View more
09-14-2022
10:59 PM
|
0
|
4
|
2201
|
|
POST
|
Hi, Check Pairwise Intersect from geoprocessing tools.
... View more
09-14-2022
06:55 AM
|
1
|
0
|
1214
|
|
POST
|
Hi, Your code structure isn't correct. You need to separate UI and work tasks first. I would do it like that: static string GetBoundary()
{
OpenItemDialog item = new OpenItemDialog();
item.Title = "Select the Boundary";
item.MultiSelect = false;
item.ShowDialog();
return item.Items.First().Path;
}
static async Task<string> Extent(string fcPath)
{
string results = "";
await QueuedTask.Run(() =>
{
// Want to use this path name to create a feature class
string boundary = GetBoundary();
// This is fine... except how are the 2 lines below made to run from an OpenItemDialog
Geodatabase gdb = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(Path.GetDirectoryName(fcPath))));
using (FeatureClass fc = gdb.OpenDataset<FeatureClass>(Path.GetFileName(fcPath)))
{
string xMax = fc.GetExtent().XMax.ToString();
string xMin = fc.GetExtent().XMin.ToString();
string yMax = fc.GetExtent().YMax.ToString();
string yMin = fc.GetExtent().YMin.ToString();
results = $"{xMin} {yMin} {xMax} {yMax}";
}
});
return results;
}
protected override async void OnClick()
{
string fcPath = GetBoundary();
string extent = await Extent(fcPath);
MessageBox.Show(extent);
} I have added fcPath parameter for your Extent method. fcPath parameter value separated by Path methods to Directory and File name. I would recommend to use FeatureClass filter in your GetBoundary method. https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Browse-Dialog-Filters
... View more
09-08-2022
10:38 PM
|
2
|
1
|
2012
|
|
POST
|
Hi, Spherical already means Ordinary. Look here: https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/kriging.htm You can check all parameters starting that tool directly from ArcGIS Pro. After execution right click in history window and copy python script. It must be like this below: out_surface_raster = arcpy.sa.Kriging(r"C:\Temp\Learn.gdb\points", "zField", "Spherical 3,000000 200,000000 100,000000 0,000000", 10, "VARIABLE 12", None); out_surface_raster.save(r"C:\Temp\Learn.gdb\output")
... View more
09-07-2022
10:32 PM
|
1
|
1
|
1251
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|