POST
|
Hi All, Can some please help me on 'How to insert new rows in a featureclass that has relationship defined'? Thanks in Advnace. Regards, Srinivasa.
... View more
06-10-2011
07:45 AM
|
0
|
0
|
292
|
POST
|
Can you post your code and Error description? As I understood your query, are you trying to create new features in a Feature class where that class has some relationships with some other either Feature classes or Standalone tables? Did you locate where exactly you are getting the error? Hi Syamarth, Thanks for you reply. Below is the code. IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; IVersion qaVersion = versionedWorkspace.FindVersion("APATEL.NEW WO"); ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = ((IFeatureWorkspace)versionedWorkspace).OpenFeatureClass("NE.EQUIPMENT"); IMultiuserWorkspaceEdit muWorkspaceEdit = (IMultiuserWorkspaceEdit)qaVersion; IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)qaVersion; workspaceEdit.StartEdition(false); workspaceEdit.StartEditOperation(); muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned); IFeatureBuffer newFeature = featureClass.CreateFeatureBuffer(); newFeature.Shape = oldFeature.ShapeCopy; featureClass.Insert(false); //geetting exception here "Objects in this class cannot be updated outside an edit session [NE.EQUIPMENT]" workspaceEdit.StopEditing(true); I am getting error("Objects in this class cannot be updated outside an edit session [NE.EQUIPMENT]" ) at featureClass.Insert(false). If the same code runs on a featureclass that doesn't have any realtionship, its working fine. Thanks in advance. Regards, Srinivasa.
... View more
06-09-2011
11:30 AM
|
0
|
0
|
292
|
POST
|
Hi All, I have a featureclass and in which relationsihps are defined. when i insert rows i am getting an error. Can someone please help me with a sample code on 'How to insert rows in featureclass that has relationships defined'. I am using ArcEditor 9.3 and visual studio 2010(C#). Thanks in advance. Regards, Srinivasa.
... View more
06-09-2011
08:32 AM
|
0
|
4
|
414
|
POST
|
Hi All, Any one got a solution for the same. Please share the solution. I am in need of a solution for the same kind of issue. Is this something bug in 9.3? I am not sure. Regards, Srinivasa.
... View more
06-08-2011
03:16 PM
|
0
|
0
|
251
|
POST
|
Hi All, In need of urgent help. I am trying to update a featureclass without help of IMap and IDocument. But i am repeateadly getting an error saying 'Objects in this class cannot be updated outside of an edit session[NE.EQUIPMENT]'. Please see the below code and let me is this possible or let me know an alternative. My general concept is not to use IMap or IDocument. I am using ArcGIS Desktop 9.3 Visual studio 2010(C#). ESRI.ArcGIS.esriSystem.IAoInitialize arcLicense = new ESRI.ArcGIS.esriSystem.AoInitialize(); ESRI.ArcGIS.esriSystem.IPropertySet PSC = new ESRI.ArcGIS.esriSystem.PropertySetClass(); arcLicense.Initialize(ESRI.ArcGIS.esriSystem.esriLicenseProductCode.esriLicenseProductCodeArcView); PSC.SetProperty("SERVER", "1.1.1.1"); PSC.SetProperty("INSTANCE", "1111"); PSC.SetProperty("USER", "QA"); PSC.SetProperty("PASSWORD", "******"); PSC.SetProperty("DATABASE", "TESTDB"); PSC.SetProperty("VERSION", "SDE.DEFAULT"); ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory(); ESRI.ArcGIS.Geodatabase.IWorkspace workspace = workspaceFactory.Open(PSC, 0); ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace; IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; IVersion qaVersion = versionedWorkspace.FindVersion("SDE.DEFAULT"); //APATEL.NEW WO SDE.DEFAULT ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = ((IFeatureWorkspace)qaVersion).OpenFeatureClass("NE.EQUIPMENT"); IMultiuserWorkspaceEdit muWorkspaceEdit = (IMultiuserWorkspaceEdit)workspace; IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)qaVersion; // Start a versioned edit session and an edit operation. muWorkspaceEdit.StartMultiuserEditing (esriMultiuserEditSessionMode.esriMESMVersioned); workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); if (workspaceEdit.IsBeingEdited()) { IFeatureBuffer buffFeature = featureClass.CreateFeatureBuffer(); IFeatureCursor cur = featureClass.Insert(true); } workspaceEdit.StopEditing(true); muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned); IFeatureBuffer newFeature = featureClass.CreateFeatureBuffer(); newFeature.Shape = oldFeature.ShapeCopy; featureClass.Insert(false);//getting exception here "Objects in this class cannot be updated outside an edit session [NE.EQUIPMENT]" workspaceEdit.StopEditing(true); Please let me know if i need to provide any further information. Thank you very much in advance. Regards, Srinivasa.
... View more
06-03-2011
07:23 AM
|
0
|
1
|
3583
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|