POST
|
Ok... but, i never worker on iEditor. Should I send the same defined workspace(as in my code) as a parameter to IEditor.startOperation() method?
... View more
07-21-2011
11:43 PM
|
0
|
0
|
199
|
POST
|
Hi Neil, I removed the store method and kept Updatefeature like you said. It didn't fix the problem. Only after restarting the arcmap window(mxd), the feature attribute is getting updated.
... View more
07-19-2011
09:41 PM
|
0
|
0
|
199
|
POST
|
This is what i've done in my arcmap class library: ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass(); propertySet.SetProperty("SERVER", "172.16.8.148"); propertySet.SetProperty("INSTANCE", "ESRI_SDE"); propertySet.SetProperty("DATABASE", "ARCGIS_SCADA"); propertySet.SetProperty("USER", "sde"); propertySet.SetProperty("PASSWORD", "smartgrid"); propertySet.SetProperty("VERSION", "SDE.DEFAULT"); propertySet.SetProperty("AUTHENTICATION_MODE", "DBMS"); IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass(); IWorkspace workspace = workspaceFactory.Open(propertySet, 0); try { //Cast to IFeatureWorkspace. IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace; IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("SDE.SCADA_FINAL_CB"); //Cast to IFeatureWorkspace. IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace; workspaceEdit.StartEditing(true); // Start an edit operation and create a cursor. workspaceEdit.StartEditOperation(); if (workspaceEdit.IsBeingEdited()) { // Find the index of the field to edit. int typeFieldIndex = featureClass.FindField("STATE"); IQueryFilter queryFilter = null; IFeatureCursor searchCursor = null; IFeature feature = null; queryFilter = new QueryFilterClass(); queryFilter.WhereClause = "OBJ_NAME='object'"; searchCursor = featureClass.Update(queryFilter, false); while ((feature = searchCursor.NextFeature()) != null) { feature.set_Value(typeFieldIndex, o.Value); feature.Store(); searchCursor.UpdateFeature(feature); // Since the edit operation is ending, release the cursor. Marshal.ReleaseComObject(searchCursor); } mxDoc.ActiveView.Refresh(); //Stop the edit operation. workspaceEdit.StopEditOperation(); workspaceEdit.StopEditing(true); } } now if i see the arcmap and check out the feature for update(value change in field), im not getting the updated one. If i click "start editing" from the editor dropdown menu, im able to find the update in attributes table. It is working even if the arcmap window is closed and opened again. I want to get the updates without any manual operation.
... View more
07-18-2011
10:08 PM
|
0
|
4
|
781
|
POST
|
I couldn't get any example on this interface in the internet. Please provide me a function(in C#) that uses IForwardStarGen interface for traversing a network.
... View more
07-18-2011
09:57 PM
|
0
|
0
|
472
|
POST
|
apologies for responding late, arcobjects with arcmap. i've got it fixed. thanks 4 the reply though. 🙂
... View more
06-29-2011
06:05 AM
|
0
|
0
|
126
|
POST
|
Hi all, I have a set of feature classes viz, point & line, the connections to these features are made in such a manner so as to represent a electrical network. This network is bound by a polygon feature. My requirement is, if i click the polygon, the network should be opened in a new arcmap window. Plz respond quickly.
... View more
05-31-2011
08:07 PM
|
0
|
3
|
375
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|