|
POST
|
the Config.daml is part of the _addin_. It's not part of the Pro installation. To use DAML in the manner u desire, you would author/create and addin using the Pro SDK. In the Config.daml of the addin u would then use the DAML examples I specified in the links. The addin would need to be installed on the client machine(s) whose Pro UI u wanted it (the addin) to customize.
... View more
01-24-2022
12:58 PM
|
0
|
0
|
1370
|
|
POST
|
as currently, u would need to use the CIM and access the DataConnection. Any DataConnection of a service layer that has a "CustomParameters" member can have custom parameters set that will be appended to the URL. so something like..... //on the QueuedTask
var dc = serviceLayer.GetDataConnection() as CIMAGSServiceConnection;
CIMStringMap[] customParams = { new CIMStringMap { Key = "custom1", Value = "12345" }, new CIMStringMap { .... etc ....} };
dc.CustomParameters = customParams;
serviceLayer.SetDataConnection(dc); The complete set of data connection types for service layers can be seen in the hierarchy diagram here: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic4980.html
... View more
01-24-2022
08:45 AM
|
0
|
1
|
2525
|
|
POST
|
Note: if u wanted to change the default (default"s") for all projects u might find these snippets useful: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Content#set-generaloptions-to-use-defaults
... View more
01-24-2022
08:21 AM
|
0
|
1
|
3052
|
|
POST
|
we are looking at allowing an addin to define custom parameters when the connection to the layer is created (i.e. via the call to LayerFactory.Instance.CreateLayer(......) in code). Custom parameters defined as part of "creating" the layer connection via LayerFactory would automatically be appended to the URL of the service layer each time Pro "called" it (eg on a select, refresh, etc) This would be in 3.0 - our next release.
... View more
01-21-2022
03:59 PM
|
1
|
1
|
2535
|
|
POST
|
Hi Johnny, UI customization can only be done programmatically via an add-in, usually in its Config.daml. A deeper level of customization is also possible via a Configuration. U can also modify Pro ribbon appearance "by hand" via the UI: Project->Options->Customize the Ribbon Here are some DAML examples: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-DAML Here is some more information on Configurations: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations
... View more
01-21-2022
03:51 PM
|
0
|
1
|
1376
|
|
POST
|
Hi Dylan, See here for how to create a style: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#styles "Style Items" are what is stored in style files. The base class is StyleItem: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic12305.html . There is also more information here: https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Authoring#style-item The concrete style items are listed in the Inheritance Hierarchy on the API reference page (the link to the topic page above) and any, or all, of them can be stored in, or retrieved from, a .stylx. Specifically, in your case, where u want to store symbols in a style file, you want a SymbolStyleItem. https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/index.html#topic12405.html . SymbolStyleItem is used to wrap a CIMSymbol - whether custom or otherwise. In this snippet I am using SymbolFactory to create 4 custom symbols - a point, line, poly, and text CIMSymbol - just using the defaults. Note how I wrap them in a SymbolStyleItem to add each of them to my style file. The only caveat is that the style file to which I am adding them must be in the project. QueuedTask.Run(() => {
//make some (custom) symbols
var symbols = new List<CIMSymbol>();
symbols.Add(SymbolFactory.Instance.DefaultPointSymbol);
symbols.Add(SymbolFactory.Instance.DefaultLineSymbol);
symbols.Add(SymbolFactory.Instance.DefaultPolygonSymbol);
symbols.Add(SymbolFactory.Instance.DefaultTextSymbol);
//access the style file to be updated
var stylx_file = Project.Current.GetItems<StyleProjectItem>().FirstOrDefault(
item => item.Name == "My_Defaults");//must already be in the project
//make the style items that wrap the symbols
int p = 1;
int l = 1;
int pl = 1;
int t = 1;
foreach (var symbol in symbols) {
var key = "";
var category = "";
var itemType = StyleItemType.Unknown;
if (symbol is CIMPointSymbol ptSym) {
key = $"Point Symbol {p++}";
category = "Point";
itemType = StyleItemType.PointSymbol;
}
else if (symbol is CIMLineSymbol lnSym){
key = $"Line Symbol {l++}";
category = "Line";
itemType = StyleItemType.LineSymbol;
}
else if (symbol is CIMPolygonSymbol polySym) {
key = $"Polygon Symbol {pl++}";
category = "Polygon";
itemType = StyleItemType.PolygonSymbol;
}
else if (symbol is CIMTextSymbol textSym) {
key = $"Text Symbol {t++}";
category = "Text";
itemType = StyleItemType.TextSymbol;
}
else {
continue;//mesh
}
//make the symbol style item
var ssi = new SymbolStyleItem() {
Name = key,//Can be any string - localized is fine
Key = key,//must be unique
Tags = itemType.ToString(),//tag1;tag2;tag3;etc
Category = category,//arbitrary string for organizing your items
ItemType = itemType,//style item type
Symbol = symbol //your symbol
};
//add the style item
stylx_file.AddItem(ssi);
}
//copy an existing symbol into the style file
var arcgis_2d = Project.Current.GetItems<StyleProjectItem().FirstOrDefault(
item => item.Name == "ArcGIS 2D");
//get an arbitrary symbol, or symbols
var poly_ssi1 = arcgis_2d.SearchSymbols(StyleItemType.PolygonSymbol, "Glacier")[0];
var poly_ssi2 = arcgis_2d.SearchSymbols(StyleItemType.PolygonSymbol, "Buffered Gradient")[0];
//add them
stylx_file.AddItem(poly_ssi1);
stylx_file.AddItem(poly_ssi2);
//... etc ...
});
For more code snippets on how to access the various style items from a style file, please see the snippets here: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#symbol-search Result: eg, the polygon symbols:
... View more
01-21-2022
03:37 PM
|
0
|
0
|
1490
|
|
POST
|
Hi Stephen, you're welcome. As currently there are no plans to support VS 2022 at 2.9
... View more
01-06-2022
04:04 PM
|
0
|
0
|
3809
|
|
POST
|
I dont have an answer for your #1. On #2, no the Pro SDK is not supported on 2022 at 2.9. However, if u have an add-in previously created for 2019 there shouldnt be any problem editing/compiling/debugging it, etc in 2022. It's just that u wont be able to add additional items to it using the SDK item templates - new items would have to be added "by hand".
... View more
12-28-2021
08:45 AM
|
0
|
2
|
3843
|
|
POST
|
Can u post the code please? Sounds like you may be using System.Threading.Tasks.Task rather than a QueuedTask? Although QueuedTask has the same semantics as a "System" Task, it's behavior is quite different.
... View more
12-28-2021
08:38 AM
|
0
|
1
|
1495
|
|
POST
|
For an animation sample, see https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/CustomAnimation The example below will remove any existing layer keyframes and add new keyframes for four layers - layersA, B, C, and D - so that each is visible for three seconds. If the timing needs to line up with the CameraTrack, the TrackTime can be pulled from each keyframe for that track. Also, for a layer track the keyframes added to the beginning (zero seconds) should duplicate the second keyframe. Otherwise it would only show for an instant before transitioning to the second keyframe. layerTrack.CreateKeyFrame: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic11829.html var map = ....
//has four layers - eg raster layers - layersA, layersB, layersC, layersD
//
if (map != null)
{
LayerTrack layerTrack = null;
foreach (var track in map.Animation.Tracks)
{
if (!(track is LayerTrack))
continue;
layerTrack = track as LayerTrack;
break;
}
if (layerTrack.Keyframes.Count > 0)
layerTrack.DeleteKeyframe(0, layerTrack.Keyframes.Count - 1);
//Layer, time on the track, Visibility, Transparency, Animation type
layerTrack.CreateKeyframe(layersA, new TimeSpan(0, 0, 0), true, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersB, new TimeSpan(0, 0, 0), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersC, new TimeSpan(0, 0, 0), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersD, new TimeSpan(0, 0, 0), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersA, new TimeSpan(0, 0, 3), true, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersB, new TimeSpan(0, 0, 3), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersC, new TimeSpan(0, 0, 3), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersD, new TimeSpan(0, 0, 3), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersA, new TimeSpan(0, 0, 6), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersB, new TimeSpan(0, 0, 6), true, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersC, new TimeSpan(0, 0, 6), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersD, new TimeSpan(0, 0, 6), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersA, new TimeSpan(0, 0, 9), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersB, new TimeSpan(0, 0, 9), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersC, new TimeSpan(0, 0, 9), true, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersD, new TimeSpan(0, 0, 9), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersA, new TimeSpan(0, 0, 12), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersB, new TimeSpan(0, 0, 12), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersC, new TimeSpan(0, 0, 12), false, 1.0, AnimationTransition.Linear);
layerTrack.CreateKeyframe(layersD, new TimeSpan(0, 0, 12), true, 1.0, AnimationTransition.Linear);
}
... View more
11-22-2021
01:32 PM
|
0
|
0
|
847
|
|
POST
|
to coin a phrase: just do it. this is possible through the api and, apparently, not the ui. var textGraphic = new CIMTextGraphic() {
Text = "Callout Text",
Placement = Anchor.CenterPoint,
Symbol = textSymbol.MakeSymbolReference(),
Shape = MapView.Active.Extent.Center,
//Leaders is an array of CIMLeader - add a Leader point to show
//the leader, remove Leaders to hide the leader.
Leaders = new CIMLeader[] {
new CIMLeaderPoint(){
Point = MapPointBuilderEx.CreateMapPoint(
MapView.Active.Extent.Center.X - 5000,
MapView.Active.Extent.Center.Y - 1500)
},
new CIMLeaderPoint(){
Point = MapPointBuilderEx.CreateMapPoint(
MapView.Active.Extent.Center.X - 3500,
MapView.Active.Extent.Center.Y - 2500)
},
new CIMLeaderPoint(){
Point = MapPointBuilderEx.CreateMapPoint(
MapView.Active.Extent.Center.X - 500,
MapView.Active.Extent.Center.Y - 5000)
}
}
};
... View more
10-28-2021
08:10 AM
|
0
|
0
|
1238
|
|
POST
|
Looks like the leader is part of the graphic not the symbol. I made a text graphic in the UI and added a leader to it then deconstructed the CIM xml. Note that, w/ a map via graphics layer, the leader position is specified in map units (not page units/points). In my case, the base map is the World Topo in Web Mercator, meters. The leader offset (in the symbol) seems to be the minimum distance beyond which a leader is shown. var graphicsLayer = MapView.Active.Map.TargetGraphicsLayer;
//This is your method
var textSymbol = await CreateBalloonCalloutAsync(ColorFactory.Instance.WhiteRGB);
var textGraphic = new CIMTextGraphic()
{
Text = "Callout Text",
Placement = Anchor.CenterPoint,
Symbol = textSymbol.MakeSymbolReference(),
Shape = MapView.Active.Extent.Center,
//Leaders is an array of CIMLeader - add a Leader point to show
//the leader, remove Leaders to hide the leader.
Leaders = new CIMLeader[] { new CIMLeaderPoint()
{
//for a graphics layer, the leader location is in map coords
Point = MapPointBuilderEx.CreateMapPoint(MapView.Active.Extent.Center.X - 5000,
MapView.Active.Extent.Center.Y - 1500)
}
}
};
QueuedTask.Run(() =>
{
graphicsLayer.AddElement(textGraphic);
});
... View more
10-26-2021
04:31 PM
|
1
|
5
|
4851
|
|
POST
|
this is probably a timing issue - the name change being applied before the UI refresh (related to the new element being added) has completed. Separate the name change in to its own QueuedTask and u should get the result u r looking for. Like so: private async void LinearBandButton(Layout layout, Map map, MapFrame mfElm)
{
var mfElm = await QueuedTask.Run(() =>
{
layout = LayoutFactory.Instance.CreateLayout(...);
...
return LayoutElementFactory.Instance.CreateMapFrame(layout, env, map);
});
//separate queuedtask
QueuedTask.Run(()=> {
//When I add the Map Frame to the Layout, I want it to be called "Linear Band."
mfElm.SetName("Linear Band");
});
}
... View more
10-26-2021
02:51 PM
|
0
|
0
|
1196
|
|
POST
|
I'm curious about the use of "ConfigureAwait(false)"....are u trying to change the synchronization context from the QueuedTask? FWIW QueuedTask It is a single thread _by design_......if you remove that statement what happens?
... View more
10-21-2021
03:38 PM
|
1
|
0
|
1658
|
|
POST
|
I think Wolf gives an excellent suggestion - in many cases, the best way to figure out the CIM is to _deconstruct_ an object that already has the desired behavior - in this case a symbol. So, if I go to the symbology dockpane, I do see a few of the predefined symbols that have similar behavior to what you are after - in ArcGIS 2D, the Railroad symbol, Hatch Line symbol, and Line with Marker, Continuous symbol all look like good candidates. So, using the Railroad symbol, for example: if I apply a Perpendicular offset of 3 pt and change the placement template to 5 (like u have in your code), I get: Which is similar to what u are after. If I view the symbol in the CIM Viewer (with the CIM Viewer dockpane open, just click on the layer in the TOC and scroll down to its renderer) I see this as the definition for the MarkerPlacement on the marker in the line symbol corresponding to those UI settings: This gives u a clue about how to code the symbol and u can apply the relevant settings, etc. I have a whole session on the CIM and use of the CIM Viewer here and another session on CIM symbology here. For example, this XML in the CIM Viewer tells me that the marker, from railRoadSymbol.SymbolLayers[0] has a MarkerPlacement defined as follows: var marker = lineSymbol.SymbolLayers[0] as CIMVectorMarker;
marker.MarkerPlacement = new CIMMarkerPlacementAlongLineSameSize(){
PlacePerPart = true,
AngleToLine = true,
Offset = 3,//<-- Perpendicular offset
ControlPointPlacement = PlacementEndings.WithMarkers,
PlacementTemplate = new double[] { 5 }
}; and so on and so on........ The idea is to fiddle with the UI to tweak your symbol and get it the way u want it. Then deconstruct in the CIM Viewer and transfer what u observe in the XML structure to your code. This is an iterative process.
... View more
10-21-2021
03:17 PM
|
0
|
0
|
2161
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-19-2026 10:29 AM | |
| 1 | 04-29-2026 02:06 PM | |
| 1 | 01-08-2026 02:03 PM | |
| 1 | 01-08-2026 02:15 PM | |
| 3 | 12-17-2025 11:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|