|
POST
|
I tested this in Pro 2.6. I don't see this issue. This is the code snippet I am using. (below). I checked the generated png in Visual Studio - it was 24 bit. QueuedTask.Run(() => {
var layout = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault().GetLayout();
//Export a map frame to JPG.
PNGFormat png = new PNGFormat
{
HasWorldFile = true,
Resolution = 300,
OutputFileName = @"C:\temp\layout.png",
ColorMode = ColorMode.TwentyFourBitTrueColor,
Height = 800,
Width = 1200
};
//Reference the map frame
//MapFrame mf = layout.FindElement("MyMapFrame") as MapFrame;
//Export on the worker thread
//Check to see if the path is valid and export
if (png.ValidateOutputFilePath())
{
layout.Export(png); //Export the map frame to JPG
}
});
... View more
08-05-2020
12:41 PM
|
0
|
2
|
2888
|
|
POST
|
You can use the ArcGIS.Desktop.Framework.AddInInfo class for this.
... View more
08-03-2020
12:56 PM
|
0
|
1
|
1454
|
|
POST
|
Hi Than The code I provided is for 2.6. In 2.5, when you make changes to the Number format of a renderer/colorizer using the API, it does not get updated in the TOC. This is a known issue in the 2.5 version of the Pro API. There is no fix for this in 2.5. I just checked out the code snippet you provided above - it is using an Internal class. It is recommended to not use Internal namespaces. We have now fixed this in the 2.6 API using the new static class you can see in my code snippet. Thanks Uma
... View more
07-31-2020
10:01 AM
|
0
|
0
|
2195
|
|
POST
|
Hi Nikholai, To group the values using the API, you can do this. 1. Create your Unique Value renderer the way you have been doing. 2. To add "grouping" you have to work with the CIM (Cartographic Information Model). * Get the Layer's definition as CIMFeatureLayer. * Access the Renderer from the definition. * Modify the "Groups" property on the Renderer. Below is the code snippet I used on a layer. It had two fields that I symbolized on. I then grouped the features with the "Rock" attributes. //Get the Layer's CIM Defintion
var lyrDefn = featureLayer.GetDefinition() as CIMFeatureLayer;
//Access the renderer
var renderer = lyrDefn.Renderer as CIMUniqueValueRenderer;
var symbol1 = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB);
var symbol2 = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreenRGB);
//Create the info needed for the Grouping
var groupRiverValues = new List<CIMUniqueValue>
{
new CIMUniqueValue { FieldValues = new string[] {"River", "5"} }
};
var groupRockValues = new List<CIMUniqueValue>
{
new CIMUniqueValue { FieldValues = new string[] {"Rock", "2"} },
new CIMUniqueValue { FieldValues = new string[] {"Rock", "3"} },
};
//This is the part where you create the grouping classes
var uniqueValueClasses = new List<CIMUniqueValueClass>
{
new CIMUniqueValueClass{Symbol = symbol1.MakeSymbolReference() , Editable = false, Patch = PatchShape.Default,Label = "River,5", Values = groupRiverValues.ToArray(), Visible = true},
new CIMUniqueValueClass() { Symbol = symbol2.MakeSymbolReference(), Editable = true, Patch = PatchShape.Default, Label = "Rock,3; Rock,4",Values = groupRockValues.ToArray(), Visible = true}
};
//Create the "Groups"
var groups = new List<CIMUniqueValueGroup>
{
new CIMUniqueValueGroup {Classes = uniqueValueClasses.ToArray(), Heading = "DisplayField,SubDisplay" }
};
//Set the Groups property on the renderer object
renderer.Groups = groups.ToArray();
//Important: Set the modified layer definition back
featureLayer.SetDefinition(lyrDefn); Let me know if you run into issues. Thanks Uma
... View more
07-30-2020
07:53 AM
|
0
|
0
|
2288
|
|
POST
|
At 2.6 (released yesterday), a new "GetParent" method is available on the Element class.
... View more
07-29-2020
09:05 AM
|
0
|
0
|
831
|
|
POST
|
Hi Than, Pro 2.6 was released yesterday. A new NumberFormat class in the Mapping assembly has been added to help with this. Thanks Uma
... View more
07-29-2020
07:44 AM
|
1
|
2
|
2195
|
|
POST
|
This did not make it in 2.6 release. It has been moved to the 2.7 release. Thanks Uma
... View more
07-28-2020
04:01 PM
|
1
|
1
|
3248
|
|
POST
|
Hi Marvis, It is not supported to set defaults to this Pro tool. But you can definitely create your own "Embeddable control" using the Pro SDK template. It will allow you to create the UI required on to the Map view to perform something like this. Samples: Basic Map tool with Embeddable control MapTool with Overlay Control Thanks Uma
... View more
07-28-2020
03:51 PM
|
0
|
1
|
1207
|
|
POST
|
Hi Penelope, Can you please provide a little more information as to how you are making these Ribbon Customizations? Are you making them in the ConfigurationManager class using one of these overrides? ConfigurationManager class Thanks Uma
... View more
07-28-2020
03:38 PM
|
0
|
0
|
1404
|
|
POST
|
Hi, You can use "ArcGIS Pro Configurations". ProConcepts: Configuration Additionally, check out the community samples for Configurations here: ConfigWithMap ConfigWithStartWizard Thanks Uma
... View more
07-28-2020
02:38 PM
|
0
|
0
|
1404
|
|
POST
|
Hi, This wiki has info on how to Digitally sign add-ins. If an add-in has a valid digital signature, the Add-In Manager will read this signature and provide that information. ProGuide: Digital Signatures Thanks Uma
... View more
07-28-2020
02:32 PM
|
2
|
0
|
875
|
|
POST
|
Than, This has been fixed in 2.6 (released today). You can do something like this in code to fix the labels in the TOC to reflect your number format. var numberFormat = new CIMNumericFormat
{
RoundingOption = esriRoundingOptionEnum.esriRoundNumberOfDecimals,
RoundingValue = 3,//int 1 or above
ZeroPad = true
};
rasterColorizer.NumberFormat = numberFormat;
foreach (var br in rasterColorizer.ClassBreaks)
{
var specialChar = br.Label.Substring(0, 1);
var value = NumberFormat.ValueToString(numberFormat, br.UpperBound);
br.Label = $"{specialChar}{value}";
} Thanks Uma
... View more
07-28-2020
02:28 PM
|
0
|
5
|
2195
|
|
POST
|
Hi Anandha, I am not able to see this problem in ArcGIS Pro 2.6. ArcGIS Pro 2.6 is set to release end of this month. Can you please check on this version and see if you can reproduce the problem? Thank you for reporting this! Uma
... View more
07-17-2020
07:40 AM
|
0
|
0
|
1137
|
|
POST
|
Hi, You can call the SetRotation method on the element. It also shown in the Layout Snippet here. ptTxtElm.SetRotation(45); Thanks Uma
... View more
07-17-2020
06:58 AM
|
1
|
0
|
1320
|
|
POST
|
Hi Marvis There is nothing built into the Pro SDK to accomplish this. This is purely a WPF design that you see in the tool tip functionality in the Geoprocessing pane. Thanks Uma
... View more
07-16-2020
03:19 PM
|
0
|
0
|
731
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2026 09:54 AM | |
| 1 | 01-21-2026 10:48 AM | |
| 1 | 09-18-2025 03:09 PM | |
| 1 | 11-04-2025 08:25 AM | |
| 1 | 09-23-2025 09:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|