Customer Service | Training | Contact Us
You are here: Home > User Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Geodatabase forum

Custom Editable Workspace / Dataset   Abram Gillespie May 20, 2005
Re: Custom Editable Workspace / Dataset   Chris Kerzman May 23, 2005
Re: Custom Editable Workspace / Dataset   Abram Gillespie May 23, 2005
Re: Custom Editable Workspace / Dataset   Chris Kerzman May 23, 2005
Re: Custom Editable Workspace / Dataset   Abram Gillespie May 23, 2005
Re: Custom Editable Workspace / Dataset   Chris Kerzman May 23, 2005
Re: Custom Editable Workspace / Dataset   Abram Gillespie May 23, 2005
Re: Custom Editable Workspace / Dataset   Abram Gillespie May 23, 2005
Re: Custom Editable Workspace / Dataset   Alexandre Pillonel Oct 25, 2006
Re: Custom Editable Workspace / Dataset   Abram Gillespie Oct 25, 2006
Report Inappropriate Content • Top • Print • Reply    
Subject Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date May 20, 2005 
Message I'm implementing a geodatabase for a custom data type. It's been a huge undertaking but I've got nearly all read-only capabilities working. Now I'm having trouble getting it editable. I have all the interfaces / properties implemented that I can find that has anything to do with editing. I can even get the debugger to jump into IWorkspaceEdit::StartEditing(), but once I step out of that function it immediately jumps into IWorkspaceEdit::StopEditing() and ArcMap displays a dialog saying "Could not edit data in folder or database you selected. Check to see that you have the appropriate permissions."

Anyone know what ArcMap is expecting at that point? Is there an obscure interface or property I missing?

Thanks for the help.
-Abe 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Chris Kerzman 
Date May 23, 2005 
Message Abe,

I am asking this since I can't see the rest of your code, you may already have this. Do you use the start and stop edit operation after you start your edit session and before you close it? An example would look like - pEworkspace.StartEditOperation, this would be off your edit workspace.

Chris 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date May 23, 2005 
Message I don't initiate the edit operation in code directly. First I add the layer as shown in the code section. Then I use ArcView's Editor > Start Editing menu choice. So it's actually ArcView that calls StartEditing. Any other operations (such as StartEditOperation) - I assume - will also be called via ArcView.

Since I obviously can't see ArcView's code, the rub is the mystery of what ArcView expects after calling StartEditing. Is there something specific I need to do inside of StartEditing() (like fire an event?) or something else? The return value of StartEditing is void and there are no out parameters ... so there's no information returned there.

Notes - adding the layer is trivial and is done in a VB macro. The custom geodatabase component is written in C#.

Thanks.
-Abe 
 
Dim fc As IFeatureClass
Dim featLayer As IFeatureLayer
    
Dim pMxDoc As IMxDocument
Set pMxDoc = Application.Document

Dim wksf As IWorkspaceFactory
Set wksf = New CCustomWorkspaceFactory
    
Dim fwks As IFeatureWorkspace
Set fwks = wksf.OpenFromFile("c:\thefile", 0)
    
Set fc = fwks.OpenFeatureClass("thefeatureclass")
    
Set featLayer = New FeatureLayer
Set featLayer.FeatureClass = fc
featLayer.Name = fc.AliasName
pMxDoc.AddLayer featLayer
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Chris Kerzman 
Date May 23, 2005 
Message Abe,
I just checked on one of my programs where I do the same thing, start editing in ArcView and the require the user to run the macro or dll I wrote. You still need to use "start the edit operation" and "stop edit operation" even though the user uses the start editing in ArcView. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date May 23, 2005 
Message How do you mean by "require the user?" What is it that I need to do?

Thanks for the help!
-Abe 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Chris Kerzman 
Date May 23, 2005 
Message I take it from your previous messages that you are starting the edit session from the editor menu in ArcView. Although you do this, your program that actually performs the edit must include the "StartEditOperation" and end with the "StopEditOperation" statements. Attached is some code from a program where I am doing something similar. You do not need to recognize all the code, just take not of where the start and stop edit operations are. You must use your edit workspace to get to these statements.

Hope this helps,
Chris 
 
peWorkspace.StartEditOperation
          pFieldInt = pFeature.Fields.FindField(FieldName)
          prgUpdate.Value = prgUpdate.Min
          prgUpdate.Max = pSelSet.Count
          prgUpdate.Visible = True
               For y = 1 To pSelSet.Count
                    pFeature.Value(pFieldInt) = DomainChecker.FindValue(pFeature, FieldName, cmbValues)
                    pFeature.Store
                    Set pFeature = pFcursor.NextFeature()
                         If pSelSet.Count = 1 Then
                         ElseIf pSelSet.Count > 1 Then
                            prgUpdate.Value = x
                            frmAttributes.Refresh
                         End If
               Next
                 prgUpdate.Value = prgUpdate.Max
                 frmAttributes.Refresh
                 peWorkspace.StopEditOperation
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date May 23, 2005 
Message Ok, I see where we're miscommunicating. I'm not actually performing any edits. The user should be performing the edits via the normal operations through the ArcView GUI. Whether that's shape edits or table edits shouldn't be of concern. I just want to allow my custom data to be editable ... I'm not actually editing anything in code.

-Abe 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date May 23, 2005 
Message To state it simply, I need to figure out exactly what conditions ArcView displays the error message mentioned above.

Thanks.
-Abe 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Alexandre Pillonel 
Date Oct 25, 2006 
Message Abe,

I am implementing a custom format editable by ArcGIS, and I have the same problem. I do not know what ArcGIS is expecting by my StartEditing method implementation (StopEditing is called just after). Did you resolve this problem ?

Thank you

Alex 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Custom Editable Workspace / Dataset 
Author Abram Gillespie 
Date Oct 25, 2006 
Message Nope, never solved it. This is one of the bigger factors why zigGIS never went farther than it did.

I'm convinced ESRI doesn't monitor these groups.

-Abe