|
POST
|
So I got this to work in 3.0. I'll try it in 2.9....my guess is it will work there too. Not sure why I can't edit that table using a RowCursor though. Anyways..... QueryFilter qf = new QueryFilter();
qf.SubFields = "FACILITYID";
qf.WhereClause = "FACILITYID = '" + shpFacilityID + "'";
//Table table = inspFile.GetTable();
var oids = new List<long>();
using (var rowCursor = inspFile.Search(qf))
{
while (rowCursor.MoveNext())
{
using (var row = rowCursor.Current)
{
oids.Add(row.GetObjectID());
}
}
}
var modifyTable = new ArcGIS.Desktop.Editing.EditOperation();
modifyTable.Name = "Update HYDINSP Table";
var tableInsp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
foreach (var oid in oids)
{
tableInsp.Load(inspFile, oid);
tableInsp["FACILITYID"] = sdeFacilityID;
modifyTable.Modify(tableInsp);
}
modifyTable.Execute();
... View more
07-27-2023
08:54 AM
|
0
|
1
|
1755
|
|
POST
|
Hi, No, the file is definitely not open by anything else. Only being used in the Pro project. So I'm trying this on a Pro 3.0 machine, but still getting an error on the row.Store() line. See below. So when you tried this on 3.1 did you make any code changes to what I have above??
... View more
07-27-2023
07:46 AM
|
0
|
1
|
1757
|
|
POST
|
Hi, Yes, it's all in a QueuedTask.Run. The error I get is a GeodatabaseException. So since at 2.9 the Search function doesn't really provide me a way to edit the rows, I guess that I just need to wait until we get 3.x pushed out to us by our IT department.
... View more
07-27-2023
05:34 AM
|
0
|
3
|
1766
|
|
POST
|
Hi, I'm trying to update a StandaloneTable through the SDK. It is a .dbf file, in my map at the time of running the code. I am using ArcGIS Pro 2.9. I am getting the error on the row.Store() line. I have tried to update my inspFile.Search(qf) line to inspFile.Search(qf,True), but then I get a "No Overload for method Search take 2 arguments" error. Is this just a 2.9 issue?? If so, is there some other way to update the .dbf that would work in 2.9?? StandaloneTable inspFile = map.GetStandaloneTablesAsFlattenedList().FirstOrDefault(tbl => tbl.Name == GlobalVars.HydInspFile);
QueryFilter qf = new QueryFilter();
qf.SubFields = "FACILITYID";
qf.WhereClause = "FACILITYID = '" + shpFacilityID + "'";
using (RowCursor rowCursor = inspFile.Search(qf))
{
while (rowCursor.MoveNext())
{
using (var row = rowCursor.Current)
{
row["FACILITYID"] = sdeFacilityID;
row.Store();
}
}
}
... View more
07-26-2023
12:06 PM
|
0
|
8
|
1810
|
|
POST
|
But in Pro there is no such thing as an "edit session" like in ArcMap. You are always in an edit session. And in ArcMap, the field calculator only works while in an edit session. In Pro is there someway to modify how the Field Calculator works, so that the edits done in it are 'caught'??
... View more
07-18-2023
11:01 AM
|
0
|
0
|
1252
|
|
POST
|
Hi, So I've created an Add-In for tracking any and all edits made and ensuring fields like LASTUSER, MXCREATIONSTATE, etc. are filled in properly to accomodate our asset management system. All is working, until today when I did some edits using the "Field Calculator" on a table. The edits made by the calculator saved, but none of the fields my Add-In updates got updated. Are there any known issues with how the Field Calculator works?? I also created this same Add-In for ArcMap, and in ArcMap everything updates properly even when using the Field Calculator. It's just in Pro that we are seeing this issue. We are at ArcGIS Pro 2.9. Thanks,
... View more
07-18-2023
10:27 AM
|
0
|
5
|
1256
|
|
POST
|
Hi, So I am trying to create a webmap/dashboard to show Hydrant Inspections. In our SDE we have a feature layer of hydrants and also a table that has hydrant inspections in it. In ArcGIS Pro I have created a Query Layer to show all the hydrants that have been inspected so far this year in green and all the uninspected ones are shown in red. In the query layer I am basically just joining all of the current year inspections to the hydrants, and then symbolizing based on one of the joined INSP_DATE field being "Null" or actually having a valid date. In ArcPro it works well, but once it gets published to as a webservice and I try to use it in a web map it's quite slow (which could be as expected), but I can only access the "Properties" of the layer....Pop-Ups, Labels, etc are all grayed out in the GUI. The map is there, and the symbology is correct, but it just doesn't seem to function properly. If I try to use the web map in a dashboard I just get a "cannot access data" on the visuals I am trying to add. This is hosted on our internal server, and our IT department published the layer, so I'm too sure on how exactly they created the web-service. Any ideas on how to troubleshoot this?
... View more
07-06-2023
06:30 AM
|
0
|
0
|
370
|
|
POST
|
Thanks Narelle... That works perfectly! <updateModule refID="esri_editing_EditingModule">
<menus>
<updateMenu refID="esri_editing_data">
<insertButton refID="Hyperlink_Button" placeWith="esri_mapping_SetDataSourceContextMenuItem" separator="true"/>
</updateMenu>
</menus>
</updateModule>
... View more
06-15-2023
05:54 AM
|
0
|
0
|
812
|
|
POST
|
Yes, the "Code" button above only seems to appear if you want to download ALL of the samples (ie. the entire tree). But if you want to pick and choose what samples to download, there is no option for that....at least not directly in GitHub. For example, this you can download directly: https://github.com/Esri/arcgis-pro-sdk-community-samples But this (a single branch from the above link), you cannot: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework It's not a huge problem, just kind of annoying.
... View more
06-15-2023
05:14 AM
|
0
|
0
|
1678
|
|
POST
|
No options as far as I am aware. I don't remember ever changing any settings that would affect what is shown there.
... View more
06-15-2023
05:10 AM
|
0
|
1
|
1092
|
|
POST
|
Yeah, I saw that article, but I was just thinking there has got to be a way to do it directly in GitHub.....but maybe not? Thanks!
... View more
06-14-2023
12:59 PM
|
0
|
0
|
1712
|
|
POST
|
OK, this seems to work....but is there a way to do this directly in GitHub?? https://download-directory.github.io/
... View more
06-14-2023
12:36 PM
|
0
|
0
|
1718
|
|
POST
|
Is there a way to download just a single code sample from GitHub? I'd like to have a look at this one, but I don't need to download every sample....just this one: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/DockpaneSimple
... View more
06-14-2023
12:28 PM
|
0
|
6
|
1720
|
|
POST
|
Hi, I'm trying to figure out how to add a new menu item to the "Data" menu when right clicking on a layer in the TOC. The code below will add it to the layers context menu, but doesn't place it into the correct location. I can't seem to find an ID for the "Data" menu. I want my new item to appear under "Set Data Source". <updateModule refID="esri_mapping">
<menus>
<updateMenu refID="esri_mapping_layerContextMenu">
<insertButton refID="Hyperlink_Button" placeWith="esri_mapping_SetDataSourceContextMenuItem" separator="true"/>
</updateMenu>
</menus>
</updateModule>
... View more
06-14-2023
10:36 AM
|
0
|
2
|
831
|
|
POST
|
Thanks for posting a link to the bug. So, with most of my editing tools, I follow the same process, and so far with my code upgrade to 3.0, none of them have worked. But today I updgraded one and it actually did work. The only difference was that it only edited geometry on each feature....no attribute editing. Hopefully the bug fix above will solve the problems. This code here, using .Modify, seems to be working in 3.0 for all selected features it's run on. But only editing geometry. // start the EditOperation
var modifyAsBuilts = new EditOperation();
modifyAsBuilts.Name = "Move As-Builts and Site Plans";
// Get any selected OIDs for the layer, and move each point to the mouse click point (geometry).
if (asBuiltLayer != null)
{
var selectedAB = asBuiltLayer.GetSelection();
IReadOnlyList<long> selectedAsbuiltOIDs = selectedAB.GetObjectIDs();
foreach (var oid in selectedAsbuiltOIDs)
{
modifyAsBuilts.Modify(asBuiltLayer, oid, geometry);
abCount++;
}
}
// End the edit operation - move the selected As-Built and/or Site Plan points
modifyAsBuilts.Execute();
... View more
06-08-2023
10:21 AM
|
0
|
0
|
1883
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 08-18-2023 08:57 AM | |
| 1 | 04-19-2018 05:53 AM | |
| 1 | 04-13-2018 10:07 AM | |
| 1 | 04-13-2018 10:04 AM | |
| 1 | 04-13-2018 05:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-20-2025
03:53 PM
|