POST
|
Finally found the correct command items. The featureLayer variable refers to an IFeatureLayer object. The app variable refers to an IApplication object. If featureLayer IsNot Nothing Then Dim menuUID As New ESRI.ArcGIS.esriSystem.UID menuUID.Value = "esriArcMapUI.FeatureLayerEditMenu" Dim commandBar As ICommandBar = app.Document.CommandBars.Find(menuUID) If commandBar IsNot Nothing Then Dim itemUID As New ESRI.ArcGIS.esriSystem.UID itemUID.Value = "esriArcMapUI.LayerStartEditingCommand" Dim cmdItem As ICommandItem = commandBar.Find(itemUID) If cmdItem IsNot Nothing Then DirectCast(app.Document, ESRI.ArcGIS.ArcMapUI.IMxDocument).ContextItem = featureLayer cmdItem.Execute() End If End If End If
... View more
12-18-2012
11:21 AM
|
0
|
0
|
1523
|
POST
|
Then the account you are using must already have edit access to these. Are the featureclasses versioned? Is that an SDE Workgroup or Enterprise license? The other feature classes are versioned feature classes from an SDE Workgroup.
... View more
12-17-2012
07:39 AM
|
0
|
0
|
1523
|
POST
|
In my first post, what I described as working - ICommandItem.Execute() is equivalent to clicking the Editor -> Start Editing menu item from the Editor toolbar. In this scenario the user is required to select a layer/workspace because ArcMap doesn't know what they wish to edit. When the Edit Features -> Start Editing context menu item of a layer in the ArcMap TOC is clicked - ArcMap knows which layer to start editing on - and therefore doesn't need to present the user with the dialog to select which layer/workspace to start editing. It still evaluates all layers and presents the warning/error dialog if any issues are detected. This is what I'm trying to accomplish. Interestingly, the warning/error dialog appears to display issues related to ALL layers in the active data frames table of contents - NOT just the ones being edited. The dialog attachment from my last post shows warnings for 5 layers. Two of these layers were from the workspace (FGDB) that I started an edit session on, the other three were from an SDE workspace.
... View more
12-17-2012
07:11 AM
|
0
|
0
|
1523
|
POST
|
This would work if I wanted to display the error as to why an editing session couldn't be started. When you start an editing session in ArcMap from the Editor Toolbar - you are first presented with a dialog to select the layer or workspace to begin editing. This dialog is NOT displayed if you start editing on a layer via its context menu. After making a selection, the layers in the data frame are checked for issues that might affect editing. If any are detected, they are displayed in a 'Start Editing' dialog. Often this dialog may only display warnings and the user is allowed to continue opening an editing session. I've attached a sample image of this dialog. [ATTACH=CONFIG]19997[/ATTACH] I'm looking for a way to access this data checking and dialog functionality.
... View more
12-17-2012
05:24 AM
|
0
|
0
|
1523
|
POST
|
Interesting idea Leo. I gave it a try but setting the Editors current layer didn't affect the behavior. It still prompts me for the layer/workspace to be edited. I also tried setting the MxDoc's context item to the feature layer using IMxDocument.ContextItem - but this also didn't seem to work. Thanks for the suggestion.
... View more
12-14-2012
09:21 AM
|
0
|
0
|
1523
|
POST
|
Is there a way to programmatically start an edit session on a feature layer in ArcMap and have the Start Editing warnings/errors dialog be displayed if there are any issues? IEditor.StartEditing() does not display the dialog. ICommandItem.Execute() for the "esriEditor.StartEditingCommand" works - but it also requires my user to select the layer/workspace they want to operate on. I'm really trying to replicate the behavior of the Edit Features -> Start Editing context menu item for a feature layer in the ArcMap TOC. Any ideas?
... View more
12-14-2012
07:42 AM
|
0
|
9
|
5329
|
POST
|
I'd try using a MultiValue iterator. To limit the values to feature layers you can create a stand alone variable having a feature layer data type and connect the variable to the Input Values parameter of the Iterate Multivalue as described in the Help topic Iterate Multivalue.
... View more
03-01-2011
09:06 AM
|
0
|
0
|
460
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|