POST
|
I believe you want to be .Execute() -ing after each iteration, not at the end. You're modifiying the edit operation, but not the actual attribute table (execute does that). So if you're looking for changes in the attribute table none have yet been made. And if you want all changes to be on the same undo stack, you can chain the operations i.e. editOperation = editOperation .CreateChainedOperation(); at the beginning of the loop Also note that using .Execute doesn't actually save the changes, so they can still be undone.
... View more
11-22-2017
07:59 AM
|
0
|
4
|
23
|
POST
|
Thanks Charles, that makes the symbol fill transparent. How can I group unique values together so that they share symbology?
... View more
11-09-2017
11:13 AM
|
0
|
1
|
43
|
POST
|
Hello, My goal is to achieve this: However what I'm currently getting is this: The issue is that I cannot find any information on how to apply unique value classes into the render. Currently I'm just making a ramp and applying it, but that doesnt group values and includes <all other values> (of which there are none). CIMUniqueValueClass [ ] landcoverClasses = new CIMUniqueValueClass [ ] { new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "0" } } } , Label = "Cleared" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "1" } } } , Label = "Low Vegetation" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "2" , "3" } } } , Label = "River, Waterway" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "1" } } } , Label = "Forested" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "2" } } } , Label = "Road" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "1" } } } , Label = "Medium Vegetation" } , new CIMUniqueValueClass { Values = new [ ] { new CIMUniqueValue { FieldValues = new [ ] { "2" } } } , Label = "Swamp" } , } ; . . . . var colorRamp = new CIMFixedColorRamp ( ) ; var colors = new List < CIMColor > ( ) ; foreach ( var cls in landcoverClasses ) switch ( cls . Label ) { case "Cleared" : //0 colors . Add ( CIMColor . CreateRGBColor ( 255 , 0 , 0 ) ) ; break ; case "Low Vegetation" : //1 colors . Add ( CIMColor . CreateRGBColor ( 76 , 230 , 0 ) ) ; break ; case "River, Waterway" : //2,3 colors . Add ( CIMColor . CreateRGBColor ( 0 , 92 , 230 ) ) ; break ; case "Forested" : //4 colors . Add ( CIMColor . CreateRGBColor ( 255 , 170 , 0 ) ) ; break ; case "Road" : // 5 colors . Add ( CIMColor . CreateRGBColor ( 110 , 110 , 110 ) ) ; break ; case "Medium Vegetation" : //6 colors . Add ( CIMColor . CreateRGBColor ( 0 , 115 , 76 ) ) ; break ; case "Swamp" : //7 colors . Add ( CIMColor . CreateRGBColor ( 115 , 223 , 255 ) ) ; break ; default : colors . Add ( CIMColor . CreateGrayColor ( 130 , 100 ) ) ; break ; } colorRamp . Colors = colors . ToArray ( ) ; UniqueValueRendererDefinition uvr = new UniqueValueRendererDefinition ( ) { ValueFields = new string [ ] { "LANDCOVERTYPE" } , ColorRamp = colorRamp } ; var cimRenderer = featureLayer . CreateRenderer ( uvr ) ; featureLayer . SetRenderer ( cimRenderer ) ; Any help would be appreciated. Thank you.
... View more
11-09-2017
08:31 AM
|
0
|
3
|
280
|
POST
|
I think it's because the raster is very large. I will test some things out though, thank you!
... View more
10-06-2017
06:39 AM
|
0
|
0
|
128
|
POST
|
Thanks for the suggestion, unfortunately the tool becomes unresponsive after hitting Geoprocessing.MakeValueArray(raster, "MIN");
... View more
10-06-2017
06:20 AM
|
0
|
2
|
128
|
POST
|
From a BasicRasterLayer you can use the CIMRasterStretchColorizer.StretchStats to get the min/max values, but I want to get the min/max from a custom extent. Since a Raster lets me set a new extent, I've been trying to get some useful values out of it. Any suggestions or recommendations?
... View more
10-05-2017
11:48 AM
|
0
|
5
|
1318
|
POST
|
Sean, my edit operation op.ErrorMessage always seems to be "Edit operation failed.", is there any way of getting more information?
... View more
09-21-2017
12:27 PM
|
0
|
1
|
10
|
POST
|
Thank you for the sample, it works for me. I am going to play around with it some more and let you know how it goes Thanks for the help!
... View more
09-20-2017
11:49 AM
|
0
|
0
|
10
|
POST
|
Thank you Uma, these are the results of the breakpoints below. Here I'm using the variable PanelID to hold the _viewPaneID (which correctly matches my pane id in DAML). Everything seems like it should be working, but the pane stays open
... View more
09-20-2017
08:48 AM
|
0
|
0
|
23
|
POST
|
I'm using the snippet you provided above, but for whatever reason the actual pane will not close IList<uint> myPaneInstanceIDs = new List<uint>(); foreach (Pane pane in FrameworkApplication.Panes) { if (pane.ContentID == _viewPaneID) { //_viewPanelD is correct myPaneInstanceIDs.Add(pane.InstanceID); //InstanceID of your pane, could be multiple, so build the collection } } foreach (var instanceID in myPaneInstanceIDs) { //close each of "your" panes. FrameworkApplication.Panes.ClosePane(instanceID); ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Closed pane " + instanceID); //my addition, shows me that a pane is found }
... View more
09-20-2017
05:12 AM
|
0
|
0
|
23
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|