

That solution does work, however it's much slower. The solution suggested by ESRI is to insert the data into an empty feature class then append the feature class to the geometric network.

Obtain a feature from a feature layer : featureset featurelayer. IRow: nextRow() Advance the position of the cursor by one and return the Row object at that position. There is currently a bug (Bug NIM102778) on file with ESRI over this issue. Feature (geometryNone, attributesNone) Entities located in space with a set of properties can be represented as features. Object: insertRow(IRowBuffer buffer) Insert a new Row into the database using the property values in the input buffer. The answer suggested here does not solve the issue if your are trying to use the da.InsertCursor to add data in a Geometric Network.

"SystemError: error return without exception set"

Google suggested this answer for the following arcpy.da.InsertCursor error: With arcpy.da.InsertCursor(targetFC,fieldnames) as iCur: With arcpy.da.SearchCursor(sourceFC,fieldnames) as sCur: To avoid this error, put the feature class into load-only mode (see IFeatureClassLoad) prior to creating the insert cursor and when the inserts are completed take the feature. Out_fields = įieldnames = ' for field in fields if field.name not in out_fields] ArcObjects Library Reference (GeoDatabase) IFeatureCursor.InsertFeature Method Insert a new Feature into the database using the property values in the input buffer. I can select a Single Table in the TOC, I can perform a query and I can find out if a field exists, but I can't retrieve.
ARCOBJECTS ICURSOR HOW TO
# List all field names except the OID field and geometry fields I'm working with a GDB Single Table (not an attribute table) and I'm having problem with retrieving field values, because I'm not sure how to handle the ICursor, on Single Tables. This mode may be acceptable if the user continues to pan - and thus enters a move flexible panning mode but the problem with the original mouse cursor still remains.As long as your source and target FC's have the same number of fields and have the same geometry type, this should work: # Get field objects from source FC Unfortunately this is not as responsive as the initial panning mode though. More info : Once TrackPan has been called in response to a mouse down event, and the user continues to hold down the right mouse button (for +-1.5 seconds) then ArcObjects will enter a different 'panning mode' which automatically displays the relevant mouse panning cursor depending on the mouse movement. I've noticed the 'PanStart' and 'PanStop' methods, but I really would like to use the TrackPan feature.Īnother solution would be to fire a timer on mouse up, which then checks the mouse pointer and sets it back - but that's messy I suspect that there is an 'afterpan' event which is possibly called after OnMouseUp, and overrides the mouse pointer? However, the moment I add something like panning, ArcObjects seems to go and override the pointer again in the background :Ī() I scratched around some more and found the MousePointer property (supported for ArcEngine) which works for the basic case:ĪxMapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair ĪxMapControl.MousePointer = esriControlsMousePointer.esriPointerHand
ARCOBJECTS ICURSOR CODE
(Another test : Setting the cursor directly using DotNet (see commented code above) works correctly) Is this the problem? - Does only apply to ArcView/ ArcMap/ ArcDesktop?) If yes, how should I be setting the cursor through arc objects SDK for a custom mapping application? NOTE - I have only ArcEngine installed (not ArcDesktop, or any of the other ESRI applications). "Retrieving the COM class factory for component with CLSID failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))." If I run the mouse down code above it throws an exception : Void axMapControl_OnMouseUp(object sender, IMapControlEvents2_OnMouseUpEvent e) IMouseCursor appCursor = new MouseCursorClass() Void axMapControl_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e) Using the mouse down and mouse up events of the main map control, I've added code to set the mouse cursor accordingly: There is a problem I am experiencing with loading the mouse cursor. It correctly loads and displays maps and other features tested this far. The map control in instantiated, initialized and docked within the main form of the application.
ARCOBJECTS ICURSOR WINDOWS
I'm writing a custom application (DotNet 4.0, Windows Forms) that uses ArcObjects SDK in order to achieve custom mapping tool functionality.
