POST
|
Are you attempting to pass in Direct-Connect parameters in your property set? If so you likely need to add several parameters, and also make sure your Instance parameter is correct. (We have an Oracle database and the Instance parameter to be passed in via PropertySet is different than what ArcCatalog reports - not sure if that is the same for your SQL Server database or not...)
... View more
03-22-2019
02:57 PM
|
0
|
0
|
860
|
POST
|
You just need to add "SHAPE" to your list of fields specified in .SubFields
... View more
10-16-2018
10:59 AM
|
2
|
0
|
1248
|
POST
|
OnStartEditing and OnStopEditing are the correct locations to wire/unwire your version events, but I don't see anywhere in your code where IMapEvents_VersionChanged is set up. That would need to be wired/unwired in a different location and may explain the issue. I have a method in my project that resets the workspace inside the version changed event. If that doesn't help perhaps post all your (relevant) code and something will jump out...
... View more
09-18-2018
10:20 AM
|
2
|
1
|
3284
|
POST
|
Hi Harald, Event variables can go out of scope at "unexpected" times. You'll need to wire/unwire event handlers and hydrate variables at all event boundaries. For example if someone opens a particular mxd, the OpenDocument event fires, followed by BeforeCloseDocument and CloseDocument, then another OpenDocument. Any variables hydrated at the first OpenDocument will have gone out of scope and the RCW error will occur the next time they are referenced. Instead you would want to use modular level variables which are hydrated at OpenDocument and released at BeforeCloseDocument, then hydrated again during the next OpenDocument so you have a "fresh" instance. This event lifecycle is similar for Map events, Edit events, etc. Below is an outline that should help for a simple MXD with one map in it. It gets more complicated when switching between multiple data frames, edit sessions and workspaces, etc. Startup event fires (+DocumentEvents - set up listeners for OpenDocument, NewDocument and BeforeCloseDocument) OpenDocument/NewDocument event fires (initial ArcMap opening event) (+MapEvents) (+EditEvents) BeforeCloseDocument event fires (this fires before the actual MXD that was chosen opens) (-EditEvents) (-MapEvents) OpenDocument/NewDocument event fires (now we are in the MXD selected for opening and ready for action) (+MapEvents) (+EditEvents) ---------------------------------------------------------------- The bulk of operations occurring in your session ---------------------------------------------------------------- BeforeCloseDocument event fires (session is done, user is either opening another MXD or closing ArcMap) (-EditEvents) (-MapEvents) Shutdown event fires (user is definitely closing ArcMap at this point) (-DocumentEvents)
... View more
09-17-2018
10:33 AM
|
2
|
3
|
3284
|
POST
|
Here is some old code from 10.3, you can use IMapAdmin2: If newFC IsNot Nothing Then featureLyr.FeatureClass = newFC Dim mapAdmin2 As IMapAdmin2 = map mapAdmin2.FireChangeFeatureClass(ds, newFC) m_bSetDirty = True End If
... View more
09-13-2018
10:39 AM
|
0
|
0
|
639
|
POST
|
I think you'll want to set up your event using a variable: ArcObjects 10 .NET SDK Help I've also utilized a counter to help avoid RCW errors when deprecating event listeners: private void SetupCoreFrameworkMapEvents() { if (m_application.Document.Parent is IMxApplication && m_sbRefs_MapEvents == 0) { m_VersionChanged = new CoreFramework.FrameworkVersionChangedEventHandler (WaterEditorExtension_ExtensionVersionChanged); m_coreFramework.FrameworkVersionChanged += m_VersionChanged; m_sbRefs_MapEvents += 1; } } private void RemoveCoreFrameworkMapEvents() { while (m_sbRefs_MapEvents > 0) { if (m_VersionChanged != null) { m_coreFramework.FrameworkVersionChanged -= m_VersionChanged; } m_sbRefs_MapEvents -= 1; } }
... View more
09-10-2018
08:53 AM
|
2
|
1
|
420
|
POST
|
I feel like we've had this conversation before Any idea *when* this will be available? Also how about Undo/Redo events? Thanks, Jeff
... View more
06-14-2018
02:06 PM
|
0
|
9
|
1083
|
POST
|
Assuming you set up your representation's geometry editing behavior to use Override geometry, you can set IRepresentation.Shape to the modified geometry, then call IRepresentation.UpdateFeature() and finally call IFeature.Store().
... View more
06-14-2018
08:56 AM
|
0
|
0
|
733
|
POST
|
In ArcPro 2.1 there was an Operation object available in the args: private void OnRowChanged(ArcGIS.Desktop.Editing.Events.RowChangedEventArgs args) { QueuedTask.Run(() => { EditOperation eo = args.Operation; //blah blah blah //more awesome code //blah blah blah }); } I don't see it any longer in ArcPro 2.2 - anyone know if this is coming back?
... View more
06-12-2018
10:01 AM
|
0
|
11
|
1619
|
POST
|
If you right click the layer and select Symbology to open its property window, you can add a custom label there.
... View more
07-14-2017
10:29 AM
|
3
|
0
|
994
|
POST
|
Here is an old page of samples: IContentsView Example
... View more
07-13-2017
11:13 AM
|
0
|
0
|
422
|
POST
|
Sorry, I haven't messed with the Datastore object yet. This works for an SDE layer that isn't in the map: Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri(" [full path to connection file] ")));
var fc = geodatabase.OpenDataset<FeatureClass>(" [featureClass name] ") as FeatureClass;
... View more
07-06-2017
01:15 PM
|
0
|
0
|
575
|
POST
|
I'm assuming your SDE feature class is listed as "editable" in the List by Editing tab? Are you hydrating the fc variable from a map layer or from a geodatabase object?
... View more
07-05-2017
09:00 AM
|
0
|
2
|
575
|
POST
|
Have you looked at IEditEvents2_BeforeStopOperationEventHandler?
... View more
06-01-2017
09:00 AM
|
2
|
0
|
948
|
Title | Kudos | Posted |
---|---|---|
1 | 06-14-2016 08:33 AM | |
1 | 02-23-2015 09:11 AM | |
3 | 07-14-2017 10:29 AM | |
1 | 07-16-2015 10:07 AM | |
2 | 10-16-2018 10:59 AM |
Online Status |
Offline
|
Date Last Visited |
12-08-2020
02:52 PM
|