|
POST
|
Hi, I'm working with the OnDeleteFeature Event. Is there a way to stop the 'Delete' from happening? I'm trying to code the event so if a certain criteria is met, then it won't delete the feature. But if not met, then the feature can be deleted. Here is my code....pretty simple. The way I have it now, everything gets deleted. How do I stop the delete process?? private void Events_OnDeleteFeature(IObject obj)
{
try
{
//Check to see if current obj is a Feature.
if (obj is IFeature)
{
//Cast to an IFeature
IFeature inFeature = (IFeature)obj;
ITable inTable = obj.Table;
//Look for the Maximo field and edit.
if (inFeature.Fields.FindField("MXCREATIONSTATE") != -1)
{
inFeature.set_Value(inFeature.Fields.FindField("LifeCycleStatus"), "REMOVED");
//MessageBox.Show("SET TO REMOVED");
return;
}
else
{
MessageBox.Show("DELETE IT");
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error in onDeleteFeature procedure.");
}
}
... View more
06-30-2022
11:03 AM
|
0
|
8
|
1573
|
|
POST
|
Hi, I'm trying to get the name/names of all the layers in the TOC that the user may have selected. Can anyone point me to an SDK sample or some code of how to do this?? Thanks,
... View more
06-14-2022
11:29 AM
|
0
|
1
|
860
|
|
POST
|
OK, so I have been troubleshooting this and think I might be on to something. So this tool I created edits a few different attributes on the selected, or even multiple selected features. I have a loop to deal with multiple selected features so I use an Inspector and run a editOperation.Modify(insp) after each feature is processed. At the end I commit all edits with EditOperation.Execute. It seems like with one selected feature, EditOperation will return FALSE when there are no changes to any of the attributes on the feature. And hence the error message based on my coding. But why is this?? I also have editor tracking enabled and I can see that the DATEMODIFIED is not getting updated for features where the editOperation is not actually changing anything. Is this "by design" that it only returns TRUE when attributes actually change (ie. overwriting attributes with the exact same values does not count as an 'edit'). Hopefully this makes sense. Occasionally this tool is run on features just to make sure we have the attributes right, but if it keeps returning false then I'll have to update my coding. I just want to make sure I am understanding why it is returning false.
... View more
06-01-2022
05:59 AM
|
0
|
1
|
2021
|
|
POST
|
Hi, I'm trying to troubleshoot some editing issues with a custom tool. When the following code runs, most of the time I get the "success" message, but occassionally get the error message. The error message that the EditOperation gives is pretty vague though. Is there another way to get more detailed info about why the error is happening?? if (editOperation.Execute() == true)
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(updatedFeatures.ToString() + " features updated.", "Fittings Tool - Update Complete");
else
ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(editOperation.ErrorMessage.ToString() + "\n" + "\n" + "Please try again using the current selection. If the problem persists, let Brian know.", "Fittings Tool - ERROR");
... View more
05-30-2022
12:45 PM
|
0
|
2
|
2079
|
|
POST
|
Hi there. Just getting back to this issue after moving on to other things. Just wondering if there might be some new tools in the current SDK that might help with this. Just looking to find the nearest point on the parcel fabric for each of the red points, so I can draw a line from the red point to the parcel fabric.
... View more
05-24-2022
10:23 AM
|
0
|
0
|
662
|
|
POST
|
Yes, I'll need to look into templates a bit more. That is one thing I haven't experimented with too much.
... View more
03-28-2022
06:16 AM
|
1
|
0
|
1491
|
|
POST
|
Hi Bud, Have you looked into having Maximo look for deleted items from the GIS, and then Maximo updates it's database accordingly?? For example, a simple query such as this would allow Maximo to figure out what is missing (in this case for Hydrants), and then Maximo could do what it wants with the associated record. In this table MAXIMO has all the hydrants, and table GIS Hydrants has all the hydrants, minus the deleted ones. SELECT MAXIMO.ID FROM MAXIMO LEFT JOIN [GIS Hydrants] ON MAXIMO.ID = [GIS Hydrants].ID WHERE ((([GIS Hydrants].ID) Is Null)); One thing we don't want to do is change our workflows, just for Maximo. And keeping removed items in the GIS will eventually cause problems. People will forget to definition query them out on a map, you have to edit all of your webservices, any existing query that you use for reporting will need to be modified, etc. It seems like a real pain when a simple query will tell Maximo what is missing.
... View more
03-28-2022
06:13 AM
|
0
|
3
|
2149
|
|
POST
|
Thanks Bud, This is giving me lots to think about, although being a front-end user I'm not sure how much say in any of this I really have. I just know that we don't want to make huge changes to our current work processes in order to accommodate Maximo. Regarding "Deletes", how does your GIS function if you don't remove features? For example, if you do a road rehab contract and completely replace the storm sewer, what happens with the original features? For us, we need to remove features immediately. For instance, if a hydrant gets replaced, we delete it and add a new one. Our GIS feeds into our inspection programs, asset management, mapping, web viewers, etc. I can't have our depot guys going out looking to do inspections on hydrants that aren't really there. It just seems that Maximo does not have a way to deal with the deleted GIS features, and I guess they just stay in Maximo forever??
... View more
03-25-2022
12:38 PM
|
0
|
5
|
2207
|
|
POST
|
The problem with that is: that edit will trigger editor tracking, since the edit is done through the ArcGIS REST API. Did your group look into SQL Triggers to help with this? I'm not a DBA, but I would think if you could set up rules where the Triggers will not run when Maximo is doing it's reconciliation of records, and then enable them again once complete.
... View more
03-25-2022
08:14 AM
|
1
|
0
|
2242
|
|
POST
|
Hi Bud, Thanks for sharing. Yes, I represent an end user group (public Works) where many of our assets we maintain through GIS need to be used within Maximo. I do not think we are implementing the mapping functionality of Maximo, but we still need to maintain the Maximo field within our GIS. The following fields are added to our data: MXCREATIONSTATE, MXSITEID and MSASSETNUM. From what I remember, we update MXCREATIONSTATE to "1" for each edit/new feature, and then once Maximo syncs itself up, Maximo sets them all back to "0". With your system, how are you dealing with system deletes out of the GIS. How is Maximo recognizing deleted items?? Thanks for reminding me about user tracking. We do have Editor Tracking enabled right now, so something will need to be figured out for that. I think that is why I originally started creating Visual Studio Add-Ins to listen for edit/new feature events, so I could auto populate the editor fields as well as the Maximo fields, but it's not fool-proof.
... View more
03-25-2022
08:11 AM
|
1
|
7
|
2242
|
|
POST
|
Hi Josh, I'm going to plead ignorance on this one. I have no clue how web-editing works, so not really sure what to think. I am just a front-end user and do all my work in ArcMap/ArcGIS Pro with some development work customizing the desktop with Add-Ins. But I will take what you have suggested to our IT department who manage all of our servers/GIS and see what they think. We don't really do a lot of web-editing right now, but have been experimenting with Geocortex GO. Would what you are suggesting work with any web-editing app?? Thanks for your input!
... View more
03-25-2022
06:47 AM
|
0
|
1
|
2252
|
|
POST
|
Thanks Amanda. I'll keep that in mind. So far I've been messing with the Attribute Rules/Assistant as well as creating custom Add-Ins in Visual Studio to listen for editing events. They both work OK, but are not 100% fool-proof. There's always certain situations where they don't work. I'm hoping our DBA's can sort out something on the back-end. Thanks for your input.
... View more
03-25-2022
05:47 AM
|
1
|
0
|
4091
|
|
POST
|
Hi Amanda, I don't quite see how a relationship class would help. Can you explain??
... View more
03-25-2022
05:25 AM
|
0
|
1
|
4100
|
|
POST
|
Hi Johannes, Because as you seem to know already, not all systems work with Attribute Rules. Even with between ArcMap and ArcGIS Pro, I would need implement two different systems to accomplish the same thing. Then add in all the ArcGIS Online products. If I use QuickCollect to capture features then I also have to accommodate for this, as well any other web-editing product. It would be a perpetual cycle of constantly having to make adjustments to any bit of code/app anyone creates going forward in order to accomodate for this MXCREATIONSTATE field. IMO the best solution is something that works on the back-end and is invisible to the front-end users/developers. SQL Triggers might just be it, but that is up to the DBAs to decide.
... View more
03-25-2022
05:13 AM
|
1
|
0
|
4102
|
|
POST
|
Hi, What I need to do is figure out how to update a field in any feature class each time an edit is made to it. This is to support our asset management system, Maximo. The field is called MXCREATIONSTATE and will exist on many different feature classes in our corporate SDE. Some users use ArcMap, some use ArcGIS Pro, some use FME to make updates, some use web editing tools. Going forward other front-end apps could also make edits. What is the best way to handle this sort of situation? The out-of-the-box Attribute Rules/Attribute Assistant don't really seem to cover all the bases here. Basically, anytime an edit is made (or new feature is created) MXCREATIONSTATE must be updated to 1. Any ideas are appreciated. Thanks,
... View more
03-24-2022
12:43 PM
|
0
|
25
|
7890
|
| 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
|