|
POST
|
Hi, I have attached one of your mentioned CustomCatalog project files. You can put it on top of existing file and check it is what you want. To create new panel use dockpane burger button menu item. Fell free to ask if something is unclear.
... View more
01-07-2022
06:53 AM
|
0
|
1
|
2351
|
|
POST
|
Hi, Use method SetName of Layer object. layer.SetName("New layer name");
... View more
01-06-2022
11:11 PM
|
1
|
0
|
1083
|
|
POST
|
Hi, CalculateField_management has optional parameter for Field Type specifying. Try to specify Short because python by default has only int. So its too big for your field and needs to convert it.
... View more
01-06-2022
11:02 PM
|
0
|
0
|
1816
|
|
POST
|
Hi, Try this code: with arcpy.da.UpdateCursor(fc1,flds) as upd_cur:
for upd_row in upd_cur:
updated = False
if upd_row[1] == None:
upd_row[1] = upd_row[0]
updated = True
if upd_row[0] == None:
upd_row[0] = upd_row[1]
updated = True
if updated == True:
upd_cur.updateRow(upd_row) To speed up process you can add whereclause parameter to your UpdateCursor to check is one of fields is None or empty
... View more
01-05-2022
10:36 PM
|
1
|
2
|
1662
|
|
POST
|
Sorry, I have not checked existing of parameters. Have you checked like this: List<KeyValuePair<string, string>> env1 = new List<KeyValuePair<string, string>>();
env1.Add(new KeyValuePair<string, string>("maintainAttachments", "True"));
env1.Add(new KeyValuePair<string, string>("preserveGlobalIds", "True")); If you have to set other parameters, you can cast MakeEnvironmentArray result to List and then add additional values.
... View more
01-03-2022
12:12 AM
|
0
|
0
|
2007
|
|
POST
|
Hi, You can draw some features on map using AddOverlayAsync method . Sample is here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/OverlayExamples
... View more
01-02-2022
01:41 AM
|
0
|
0
|
3250
|
|
POST
|
Hi, You can set them like that: var env = Geoprocessing.MakeEnvironmentArray(maintainAttachments: "True",
preserveGlobalIds: "True"); Name for each setting you can find here: https://pro.arcgis.com/en/pro-app/latest/tool-reference/environment-settings/an-overview-of-geoprocessing-environment-settings.htm
... View more
01-02-2022
01:23 AM
|
0
|
2
|
2015
|
|
POST
|
Hi, Have you tried this (best-way-to-show-progress) using Dispatcher?
... View more
12-30-2021
02:03 AM
|
0
|
1
|
1002
|
|
POST
|
Hi, You can call python script from ArcGIS Pro add-in. More info here: https://developers.arcgis.com/documentation/arcgis-add-ins-and-automation/arcgis-pro/tutorials/analysis-with-python/ I think there is no possibility to call add-in from python. From python you can call ArcGIS Pro CoreHost application. How to create feature from ArcGIS Pro add-in you can find here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Editing If you create feature using feature layer, it will be automatically shown on map.
... View more
12-29-2021
12:38 AM
|
0
|
2
|
3280
|
|
POST
|
Hi, Your code is fine. But compiler thinks that there is one situation when your method AddLayerToTOC could return unassigned fLayer value. For example if your foreach cycle will not be executed. This is compiler problem, not yours. And workaround for this is to preassign fLayer value with null in line 7.
... View more
12-23-2021
08:35 AM
|
1
|
1
|
2334
|
|
POST
|
Hi, It is simple. Set it to null: FeatureLayer fLayer = null;
... View more
12-22-2021
10:08 PM
|
0
|
3
|
2340
|
|
POST
|
Hi, I try to write regression tests for my ArcGIS Pro code. Some code contains EditOperation object functionality. My code for ArcGIS Pro add-in works fine, but when I run the same code with same input data from unit test EditOperation ExecuteAsync return false. Is it impossible to write test for EditOperation or there is some magic to do that?
... View more
12-22-2021
03:23 AM
|
0
|
1
|
840
|
|
POST
|
Hi, Another way is to write standalone application using ArcGIS Pro CoreHost library. Using VBA you can start new process with your standalone application, write results to file and read result file when process finishes. How to start process you can find here: https://stackoverflow.com/questions/20917355/how-do-you-run-a-exe-with-parameters-using-vbas-shell
... View more
12-20-2021
06:37 AM
|
0
|
0
|
1431
|
|
POST
|
Hi, You can serialize ISpatialReference object to xml ant then read wkt from it. Code for serialization: private static string GetSpatialReferenceAsXmlString(ISpatialReference spatialReference)
{
if (spatialReference == null) throw new ArgumentNullException("spatialReference");
var xmlStream = new XMLStreamClass();
var xmlWriter = new XMLWriterClass();
var xmlSerializer = new XMLSerializerClass();
xmlWriter.WriteTo(xmlStream);
xmlSerializer.WriteObject(xmlWriter, null, null, string.Empty, string.Empty, spatialReference);
return xmlStream.SaveToString();
} You will get xml like this: <ProjectedCoordinateSystem xsi:type='typens:ProjectedCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.8'>
<WKT>PROJCS["LKS_1994_Transverse_Mercator",GEOGCS["GCS_LKS_1994",DATUM["D_Lithuania_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",24.0],PARAMETER["Scale_Factor",0.9998],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</WKT>
<XOrigin>-22523120044.116333</XOrigin>
<YOrigin>-22527998119.405388</YOrigin>
<XYScale>18181.818166159173</XYScale>
<ZOrigin>-100000</ZOrigin>
<ZScale>10000</ZScale>
<MOrigin>-100000</MOrigin>
<MScale>10000</MScale>
<XYTolerance>0.001</XYTolerance>
<ZTolerance>0.001</ZTolerance>
<MTolerance>0.001</MTolerance>
<HighPrecision>true</HighPrecision>
</ProjectedCoordinateSystem> Then read WKT node from it
... View more
12-17-2021
01:02 AM
|
0
|
0
|
3315
|
|
POST
|
Hi, Have you set devexpress dlls references "Copy Local" property to true?
... View more
12-16-2021
03:16 AM
|
0
|
1
|
1407
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | Tuesday | |
| 2 | 04-24-2026 08:33 AM | |
| 1 | 03-23-2026 11:44 AM | |
| 1 | 05-22-2024 11:48 PM |
| Online Status |
Online
|
| Date Last Visited |
Tuesday
|