POST
|
Thanks Uma, I've been looking at this again, but I'm still unable to get to where I want. I want to use a colour ramp (instead of defining a symbol explicitly for each break), but the ColorRamp and DefaultSymbol properties on CIMClassBreaksRenderer seems to get ignored when I set them. I also want to set the 'out of range' symbol on, but this doesn't seem to be possible with CIMClassBreaksRenderer either. I'd like to achieve the settings in the attached screengrab through the API - is this currently possible?
... View more
03-09-2017
05:36 AM
|
0
|
1
|
782
|
POST
|
I want to create a GraduatedColorsRendererDefinition using the 'Manual' classification method (in order to set breaks at unequal intervals (for example at 0.4, 0.7, 0.9, 1). Where can I set the required break values? I can't see the appropriate member on GraduatedColorsRendererDefinition. Other classification methods (defined interval, for example) work fine. // Apply renderer and add output to map
Uri uri = new Uri(OutputPath);
string colorBrewerSchemesName = "ArcGIS Colors";
StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName);
string colorRampName = "Red to Green";
IList<ColorRampStyleItem> colorRampList = await style.SearchColorRampsAsync(colorRampName);
ColorRampStyleItem colorRamp = colorRampList[0];
CIMStroke outline = SymbolFactory.ConstructStroke(ColorFactory.GreyRGB, 0, SimpleLineStyle.Solid);
await QueuedTask.Run(() =>
{
GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition()
{
ClassificationField = "VALUE",
// Defined Interval works fine
//ClassificationMethod = ClassificationMethod.DefinedInterval,
//IntervalSize = 0.2,
// How to set breaks for Manual classification method?
ClassificationMethod = ClassificationMethod.Manual,
// Set break values?
ColorRamp = colorRamp.ColorRamp,
SymbolTemplate = SymbolFactory.ConstructPolygonSymbol(
ColorFactory.GreenRGB, SimpleFillStyle.Solid, outline).MakeSymbolReference(),
};
FeatureLayer outLyr = LayerFactory.CreateFeatureLayer(uri, MapView.Active.Map, rendererDefinition: gcDef);
});
... View more
02-22-2017
08:22 AM
|
0
|
3
|
1435
|
POST
|
I can't get the Calculate Field GP tool to work where I'm using a VB script code block. I also notice that the Code Block option in the Field Calculator (launched directly from an attribute table) is disabled for VB Script. Can you clarify what the position is with this - is VB script no longer supported in Calculate Field (in favour of Python)?
... View more
11-10-2009
07:05 AM
|
0
|
7
|
852
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|