|
POST
|
Hi All, We are using ArcGIS Pro SDK 2.7. We want to add a vertex/point to the polygon. We have tried multiple ways to achieve this. 1. a. Read existing polygon points into List . b. Add the desired points (needs to add into polygon) to the list c. Update the geometry with latest geometry. Snippet; var selectedTargetFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection(); var inspTargetInspector = new Inspector(); inspTargetInspector.Load(selectedTargetFeatures.Keys.First(), targetID); Polygon objTargetPolygon = inspTargetInspector.Shape as Polygon; ReadOnlyPointCollection objTargetPolyPointCollection = objTargetPolygon.Points; ICollection<MapPoint> objMapPoints = new List<MapPoint>(objTargetPolyPointCollection.Count); objTargetPolyPointCollection.CopyPointsToList(0, objTargetPolyPointCollection.Count - 1, ref objMapPoints); objMapPoints.Add(resultMultipoint1.Points[0]); objMapPoints.Add(resultMultipoint2.Points[0]); Polygon polygon = PolygonBuilder.CreatePolygon(objMapPoints, SpatialReferences.WGS84); inspTargetInspector.Shape = polygon; //create and execute the edit operation var op = new EditOperation() { Name = "Add vertex", SelectModifiedFeatures = false, SelectNewFeatures = false }; op.Modify(inspTargetInspector); op.Execute(); But here Problem is - all these new points are creating under new Part. We want all these points into existing polygon part. 2. We tried to follow runtime sdk approach. a. Create PolygonBuilder object b. Tried to read Part, Point index in ProximityResult , AddPoint in particular index -- We dont have access to these functionality in Pro SDK. Code Snippet: PolygonBuilder builder = new PolygonBuilder(objTargetPolygon); // Create builder from existing polygon builder.Parts[0].InsertPoint(index, new MapPoint(x, y)); // Insert point into specific location graphic.Geometry = builder.ToGeometry(); // Create geometry and assign it back to the graphic / feature https://community.esri.com/t5/arcgis-runtime-sdk-for-net/command-addvertex/td-p/758557 ---------------- Can someone please help us - how can we add vertex/point into existing polygon. Also, @Wolf @UmaHarano - is there any plans to make it available all these functionalities in ArcGIS Pro SDK.
... View more
04-14-2021
04:16 AM
|
0
|
2
|
2758
|
|
POST
|
Thanks @KirkKuykendall1 for your reply. I haven't tried this option. Let me check this option and hopefully this will resolve the issue. Thanks again.
... View more
03-16-2021
01:38 AM
|
0
|
0
|
1330
|
|
POST
|
Hi All, We are creating a buffer geometry and we would like to utilize this buffer geometry for some analysis, which is going to utilize in Oracle spatial functions . FYI: We have utilized geometry.ToJson() to convert the geometry into JSON and then read the coordinates. This method is working well, If the geometry is having only rings. Steps: Read JSON geometry, capture the coorinates, pass these coordinates to Oracle procedure, create SDO_Geom based on this coordinate string and then convert back to ST_Geometry using Oracle spatial functions. But, If the Geometry has CurveRings - then we were unable to follow the same process. Can someone please help me - how to pass this geometry into Oracle spatial effectively.
... View more
03-10-2021
12:18 AM
|
0
|
2
|
1703
|
|
POST
|
Charles Macleod: Thank you for your response.I will take a look into these options and will update you. Thanks again.
... View more
04-29-2020
10:54 PM
|
0
|
0
|
1294
|
|
POST
|
Hi All, I am trying to segregated tools and its corresponding function classes into separate projects. Followed the below documentation - ProGuide Diagnosing ArcGIS Pro Add ins · Esri/arcgis-pro-sdk Wiki · GitHub ProConcepts Framework · Esri/arcgis-pro-sdk Wiki · GitHub 1. Created two projects called addIn.ProjectA and userLibrary.ProjectB. addIn.ProjectA is the add-in project. This has config.daml file userLibrary.ProjectB is the project where tools functionality available. namespace userLibrary.ProjectB internal class testButtonFunction : Button 2. Crosschecked that the addIn.ProjectA's AssemblyName and Default Namespace is same as in Config.daml's default assembly and defaultnamespace values. 3. added userLibrary.ProjectB's Namespace reference to addIn.ProjectA. 4. in the config.daml added below line <button id="testButton" caption="testButtonFromNewConfig" className="userLibrary.ProjectB.testButtonFunction" loadOnClick="true" smallImage="Images\hello.png" largeImage="Images\hello.png" > <tooltip heading="testButtonFromNewConfig"> testButtonFromNewConfig<disabledText /> </tooltip> </button> But still the button is unable to call the corresponding class. Please help me. Thanks in advance. Note: If we are having both config.daml and the tools functionality in the same project - we dont have any issues. Regards, Sreeni.
... View more
04-24-2020
03:16 AM
|
0
|
3
|
1376
|
|
POST
|
Hi Team, We are trying to apply Batch Calculation attribute rules on version feature class (which is in Branch versioned database). But we are getting below error. Whereas Immediate calculation rule is getting creating without any issues. This is the same case for Validation rules. As per documentation, Can you please help us here. Thanks in advance. Regards, Sreeni.
... View more
04-23-2020
02:32 AM
|
0
|
0
|
722
|
|
POST
|
Thank you Xander Bakker. Yes this helps. After we export to python script, we have to do a small change to the script. Script will appear as below. import arcpy arcpy.management.AddAttributeRule(input_table, "test1", "CALCULATION", r'var fsTerrainPolygon = FeatureSetByName($datastore,"Polygon",["COUNTRY_NAME"]) var fsIntersectCountry = Intersects(fsTerrainPolygon,$feature) var fCountry = first(fsIntersectCountry) if (fCountry == null) return " " return fCountry.COUNTRY_NAME', "NONEDITABLE", "INSERT;DELETE", '', '', '', '', "COUNTRY_NAME", "INCLUDE", "NOT_BATCH", None, None) The bolded and underlines single quote has to replace with multipline quote i.e """ """. This resolved the issue. Thanks again.
... View more
04-08-2020
09:39 PM
|
1
|
1
|
1363
|
|
POST
|
Hi All, I have tested below Arcade expression in ArcGIS Arcade Playground and got error saying that $datastore variable is not found. To solve this issue, i have selected globals drop down value as "Attribute rule calculatoin" and script executed successfully. var fsTerrainPolygon = FeatureSetByName($datastore,"Polygon",["COUNTRY_NAME"]) var fsIntersectCountry = Intersects(fsTerrainPolygon,$feature) var fCountry = first(fsIntersectCountry) if (fCountry == null) return " " return fCountry.COUNTRY_NAME Now The same script, i am trying to utilize in the attribute rule creation. Please find the script below. import arcpy in_table = r"featureclass_path" name = "CaptureCountryName" script_expression = 'var fsTerrainPolygon = FeatureSetByName($datastore,"Polygon",["COUNTRY_NAME"]) var fsIntersectCountry = Intersects(fsTerrainPolygon,$feature) var fCountry = first(fsIntersectCountry) if (fCountry == null) return " " return fCountry.COUNTRY_NAME' triggering_events = "INSERT;UPDATE" description = "Capture CountryName From Python Script" field = "COUNTRY_NAME" arcpy.AddAttributeRule_management(in_table, name, "CALCULATION", script_expression, "NONEDITABLE", triggering_events, "", "", description, "",field) Getting below error. ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. Failed to execute (AddAttributeRule). In the script_expression - if we give any arcade expression without globals, script is working without any issues. (i.e script_expression = 'if (1 == 0) {return "Fail"} else {return "Success" --> complete scripts executes without any issues}' Please let me know, how can add execution profile for this script or how to resolve this issue. FYI: Even alterattributerule management is also has same issue. Thanks, Sreeni.
... View more
04-08-2020
04:07 AM
|
0
|
3
|
1458
|
|
POST
|
Hi All, I want to create attribute rules through programmetically. For this, Read the filegeodatabase and checked whether AttributeRule supported or not. Created AttributeRuleManager But, here we don't have option/method to create attribute rules. ProConcepts Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub Can you please help me here. Thanks in advance. Regards, Sreeni.
... View more
04-06-2020
02:37 AM
|
0
|
2
|
1274
|
|
POST
|
Hi Narelle, Thanks for reply. My scenario is other way around. Step 1: Created a Task based on an input Feature Class. Step 2: Job 1: Performs some operation and creates output feature class Job 2: Add the output feature class to Project and save Project Job 3: Edit the existing created Task with the newly added Output Feature Class. (This output feature class is exactly same as the feature class involved Task creation, only diff is attribute data). Hope this gives more details. Thank you again. Regards, Sreeni.
... View more
04-05-2020
10:00 PM
|
0
|
0
|
1606
|
|
POST
|
Hi All, I am also getting same issue. I have tried to analyze the code using "SonarQube" from my local desktop and i am also getting same error. Please help us.
... View more
04-05-2020
09:54 PM
|
0
|
0
|
2105
|
|
POST
|
Hi, I have a ArcGIS Pro Task which got configured on a feature class. Now i want to extend this task by taking the input feature class dynamically (from another job output) and complete Task configuration on the fly. After successful configuration - i will go ahead and work on that Task. Is it possible? I tried multiple options 1. Sharing Tasks in Portal 2. Execute "Edit in Designer" button through DAML ID("esri_task_Designer"). But these are not helping , because these are intended for diff purposes. Or - please let me know, if there is any way to create Tasks on the fly. Thanks in advance.
... View more
03-31-2020
01:25 AM
|
0
|
3
|
1714
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2020 09:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-25-2025
07:26 AM
|