POST
|
Hello, I'm creating an ArcMap add-in for dynamically updating a feature layer. My map have many other layers. Every time I call ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, myFeatureLayer, null), all other layers are refreshed as well. How can I just refresh my layer? Thanks.
... View more
01-13-2017
06:16 AM
|
0
|
1
|
1171
|
POST
|
Turns out is a threading issue. The method is called by a timer method. Calling it from a extension's method fixed the problem.
... View more
07-26-2016
12:53 PM
|
0
|
0
|
337
|
POST
|
Could it be license issue? I'm using ESRI's home program.
... View more
07-25-2016
12:30 PM
|
0
|
0
|
337
|
POST
|
Hello, What I'm doing is really straight forward. In my Add-In extension, I simply create a new file geodatabase and a new feature class, and insert point features for a list of lat/longs using feature buffer. However, ArcMap creashes right on featureCursor.InsertFeature(featureBuffer). I'm using ArcMap 10.4.1. Any idea would be greatly appreciated. private void AddNewTrackingPoints(IFeatureClass featureClass, List<TrackingRecord> trackingRecords) { IDataset dataset = (IDataset)featureClass; IWorkspace workspace = dataset.Workspace; IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace; workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); // Create the feature buffer. IFeatureBuffer featureBuffer = featureClass.CreateFeatureBuffer(); // Create insert feature cursor using buffering. IFeatureCursor featureCursor = featureClass.Insert(true); try { foreach (TrackingRecord record in trackingRecords) { Point p = new PointClass(); p.PutCoords(record.Longitude, record.Latitude); // Set the feature buffer's shape and insert it. featureBuffer.Shape = p; System.Reflection.PropertyInfo[] props = record.GetType().GetProperties(); foreach (System.Reflection.PropertyInfo prop in props) { int fieldIndex = featureClass.FindField(prop.Name); featureBuffer.set_Value(fieldIndex, prop.GetValue(record)); } featureCursor.InsertFeature(featureBuffer); //ArcMap creashes here } // Attempt to flush the buffer. featureCursor.Flush(); } catch (COMException comExc) { // Handle the error in a way appropriate to your application. } finally { // Release the cursor as it's no longer needed. Marshal.ReleaseComObject(featureCursor); } workspaceEdit.StopEditOperation(); workspaceEdit.StopEditing(true); }
... View more
07-25-2016
09:34 AM
|
0
|
2
|
1293
|
POST
|
Anyone else also encountered this? My JavaScript map hangs for up to 20 seconds quite often. Occasionally server will log these errors. The problem seems in communications between IIS and ArcGIS Server. Both IIS and ArcGIS server are on the same machine. It's a windows 2012 server. Thanks for any insides and ideas.
... View more
01-12-2016
11:09 AM
|
0
|
3
|
2534
|
POST
|
And the anwser is to set all other properties in LineLabelPosition class explicitly to False.
... View more
02-15-2013
07:34 AM
|
0
|
0
|
189
|
POST
|
Hi folks, By instantiating a new LineLabelPosition class, I've made the properties set correctly in label placement properties dialog now. However, labels are not showing up automatically for my layer. I have to go to the Layer Properties dialog, simply open the Placement Properties dialog and click OK to close it, and click Apply to make the labels show up. I've searched the forums and found that people had the same problem back in 2003. Since ESRI is so great in helping our community, I wouldn't believe that the problem has not been solved after 10 years. I must have missed something simple. Please help! my code looks like this now: Private Sub CreateLabels(ByRef layer As IGeoFeatureLayer) Dim labelClasses As IAnnotateLayerPropertiesCollection labelClasses = layer.AnnotationProperties Dim labelClass As IAnnotateLayerProperties = Nothing labelClasses.QueryItem(0, labelClass, Nothing, Nothing) Dim label1 As ILabelEngineLayerProperties = labelClass CType(label1, IAnnotateLayerProperties).Class = "Label at start" CType(label1, IAnnotateLayerProperties).DisplayAnnotation = True label1.Expression = "[Line_Name]" Dim overposterLayerProperties As IBasicOverposterLayerProperties4 overposterLayerProperties = label1.BasicOverposterLayerProperties Dim label1Position As ILineLabelPosition = New LineLabelPosition() label1Position.Above = False label1Position.OnTop = True label1Position.AtStart = True overposterLayerProperties.LineLabelPosition = label1Position overposterLayerProperties.LabelWeight = 3 overposterLayerProperties.FeatureWeight = 3 End Sub Thanks
... View more
02-14-2013
08:32 AM
|
0
|
0
|
189
|
POST
|
Please Help!!! I'm trying to set the label placement properties for a newly created polyline layer in my code. However, LineLabelPosition properties are not working. My code looks like this: Private Sub CreateLabels(ByRef layer As IGeoFeatureLayer) Dim labelClasses As IAnnotateLayerPropertiesCollection labelClasses = layer.AnnotationProperties Dim labelClass As IAnnotateLayerProperties = Nothing labelClasses.QueryItem(0, labelClass, Nothing, Nothing) Dim label1 As ILabelEngineLayerProperties = labelClass CType(label1, IAnnotateLayerProperties).Class = "Label at start" CType(label1, IAnnotateLayerProperties).DisplayAnnotation = True label1.Expression = "[Line_Name]" Dim overposterLayerProperties As IBasicOverposterLayerProperties4 overposterLayerProperties = label1.BasicOverposterLayerProperties overposterLayerProperties.LineLabelPosition.Above = False overposterLayerProperties.LineLabelPosition.OnTop = True overposterLayerProperties.LineLabelPosition.Below = False overposterLayerProperties.LineLabelPosition.AtStart = True overposterLayerProperties.LineLabelPosition.InLine = False overposterLayerProperties.LabelWeight = 3 overposterLayerProperties.FeatureWeight = 3 End Sub Thanks
... View more
02-12-2013
12:16 PM
|
0
|
2
|
712
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|