|
POST
|
Hi, We found an issue with Configurations at 2.2 - In this scenario, while a Configuration is running if a 2nd instance of Pro is launched, the AssemblyCache gets deleted. This includes the files that the configuration requires.. After closing all the instances of Pro and the Configuration, if the same Configuration is relaunched, an Application crash was encountered (Assembly Cache does not get repopulated with the files the Configuration requires). We have now fixed this issue in 2.3, which is to be released soon. This sounds very similar to the issue you are experiencing. Thanks Uma
... View more
12-18-2018
03:34 PM
|
1
|
0
|
1102
|
|
POST
|
Hi Chris To clarify, the sentence in the Style Guide needs to be changed to this (thanks for catching that): "ArcGIS Pro XAML styles should be used as DynamicResources while styling the UI elements in an add-in. Add this code snippet to your xaml so that these Dynamic resources will be applied to your control in the XAML Designer in Visual Studio." To test, I did this: When I add a button control to a dockpane in an add-in and define a Esri brush as a Dynamic resource for the button's background, the XAML Designer displays this brush - in some cases I noticed a few second lag time. See screenshot below: I was wondering if you could explain what you mean by this: However, the SDK already puts this reference in the .xaml file but no dynamic resources show up in the Designer options. And manually typing in the Esri Brush name doesn't do anything. Thanks! Uma
... View more
12-13-2018
02:36 PM
|
0
|
0
|
1064
|
|
POST
|
Hi, The appearance for the tab control and the indicator has changed. When you run the Custom Catalog sample with 2.3, it looks like this (below) - which is different from 2.2. I made no code changes to the 2.2 sample, just ran it in 2.3 to see this. What do you see? Any errors?
... View more
12-07-2018
07:06 AM
|
1
|
1
|
4669
|
|
POST
|
Hi Taner No, the graphics are not persisted. Thanks Uma
... View more
11-16-2018
02:37 PM
|
2
|
1
|
3368
|
|
POST
|
Here is a code snippet to create an overlay with text. This code is from a sample Map Tool: internal class AddOverlayWithText : MapTool
{
private IDisposable _graphic = null;
private CIMPolygonSymbol _polygonSymbol = null;
public AddOverlayWithText()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Polygon;
SketchOutputMode = SketchOutputMode.Map;
}
protected override async Task<bool> OnSketchCompleteAsync(Geometry geometry)
{
//Add an overlay graphic to the map view
_polygonSymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.BlackRGB, SimpleFillStyle.Null, SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 2.0, SimpleLineStyle.Solid));
_graphic = await this.AddOverlayAsync(geometry, _polygonSymbol.MakeSymbolReference());
//define the text symbol
var textSymbol = new CIMTextSymbol();
//define the text graphic
var textGraphic = new CIMTextGraphic();
await QueuedTask.Run(() =>
{
//Create a simple text symbol
textSymbol = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 8.5, "Corbel", "Regular");
//Sets the geometry of the text graphic
textGraphic.Shape = geometry;
//Sets the text string to use in the text graphic
textGraphic.Text = "This is my polygon";
//Sets symbol to use to draw the text graphic
textGraphic.Symbol = textSymbol.MakeSymbolReference();
//Draw the overlay text graphic
_graphic = this.ActiveMapView.AddOverlay(textGraphic);
});
return true;
}
} This code creates an overlay like this:
... View more
11-15-2018
11:43 AM
|
2
|
4
|
3368
|
|
POST
|
Hi Karsten Is your assembly name "ProAppNews"? If so the the image url should be: "pack://application:,,,/ProAppNews;component/Images/globe30.png" If you right click your project node and select the Properties context menu choice, you can see the assembly name. Thanks Uma
... View more
11-13-2018
09:39 AM
|
1
|
1
|
1909
|
|
POST
|
Hi Oliver The launcherButtonID attribute can be set to the ID of a button only. You could create a button that launches your property page in your property sheet. And then you could add this button's ID to the group's launcherButtonID attribute. I used the SDK PropertySheet template and here is the code snippet for this: <group id="LaunchPropertyPage_Group1" caption="Group 1"
appearsOnAddInTab="true" launcherButtonID="LaunchPropertySheet_MyNewPropertySheet_ShowPropertySheet">
<!-- host controls within groups -->
...
</group>
</groups>
<controls>
<!-- add your controls here -->
<button id="LaunchPropertySheet_MyNewPropertySheet_ShowPropertySheet" caption="Show MyNewPropertySheet" className="MyNewPropertyPage_ShowButton" loadOnClick="true" smallImage="Images\GenericButtonPurple16.png" largeImage="Images\GenericButtonPurple32.png">
<tooltip heading="Show Property Sheet">Show Property Sheet<disabledText /></tooltip>
</button>
</controls>
</insertModule>
</modules>
<propertySheets>
<insertSheet id="LaunchPropertySheet_MyNewPropertySheet" caption="MyNewPropertySheet" hasGroups="true">
<page id="LaunchPropertyPage_MyNewPropertyPage" caption="MyNewPropertyPage" className="MyNewPropertyPageViewModel" group="Group 1">
<content className="MyNewPropertyPageView" />
</page>
</propertySheets> Thanks Uma
... View more
11-08-2018
09:37 AM
|
0
|
0
|
891
|
|
POST
|
You could get the File version of ArcGISPro.exe like this: string fileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).FileVersion;
... View more
11-07-2018
01:18 PM
|
1
|
0
|
757
|
|
POST
|
Hi Max You will have to set the alignment on the underlying text symbol. So something like this: //Create a simple text symbol
textSymbol = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 8.5, "Corbel", "Regular");
//alignement properties
textSymbol.HorizontalAlignment = HorizontalAlignment.Left;
textSymbol.VerticalAlignment = VerticalAlignment.Bottom;
//Sets the geometry of the text graphic
textGraphic.Shape = geometry;
//Sets the text string to use in the text graphic
textGraphic.Text = "This is my line";
//textGraphic.Placement = Anchor.BottomMidPoint;
//Sets symbol to use to draw the text graphic
textGraphic.Symbol = textSymbol.MakeSymbolReference();
//Draw the overlay text graphic
_graphic = this.ActiveMapView.AddOverlay(textGraphic); Thanks Uma
... View more
11-06-2018
03:13 PM
|
0
|
0
|
1111
|
|
POST
|
Hi Peter, Something like this would display specific layers in the Map Control (I have used the overload to display a collection of specific layers in line 23.): private async void InitializeMapControl()
{
ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged); //Update the content of the MapControl when the active map changes.
MapViewCameraChangedEvent.Subscribe(OnMapViewCameraChanged);
if (MapView.Active == null)
return;
if (MapView.Active.Extent == null)
return;
//Setting the collection of layers we want to display in the Map Control.
var layerToDisplay = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().First();
List<Layer> layersToDisplay = new List<Layer> { layerToDisplay };
//2D
if (MapView.Active.ViewingMode == ArcGIS.Core.CIM.MapViewingMode.Map)
{
Envelope mapControlExtent = await QueuedTask.Run(() =>
(MapView.Active.Extent.Clone() as Envelope)?.Expand(4, 4, true));
//Define 2D Extent that should be displayed inside the mapcontrol.
//_mapControl.ViewContent = MapControlContentFactory.Create(MapView.Active.Map, mapControlExtent, MapView.Active.Map.DefaultViewingMode);
//This overload use the collection of Layers we want to display the content.
_mapControl.ViewContent = MapControlContentFactory.Create(layersToDisplay, mapControlExtent, MapView.Active.Map.DefaultViewingMode);
//Event handler: When mapcontrol's extent changes, the active map view reflects the extent.
_mapControl.ExtentChanged += OnMapControlExtentChanged;
return;
}
//3D
//Define 3D View that should be displayed inside the mapcontrol.
if (MapView.Active.Camera == null)
return;
Camera newCamera = new Camera(MapView.Active.Camera.X, MapView.Active.Camera.Y,
MapView.Active.Camera.Z + 100, MapView.Active.Camera.Pitch, MapView.Active.Camera.Heading);
_mapControl.ViewContent = MapControlContentFactory.Create(MapView.Active.Map, newCamera,
MapView.Active.Map.DefaultViewingMode);
_mapControl.CameraChanged += OnMapControlCameraChanged;
}
... View more
11-05-2018
11:51 AM
|
0
|
0
|
1519
|
|
POST
|
Hi, 1. MapControl has a ViewContent property that can be set to any custom view content. In the sample, I am using the MapControlContentFactory.Create method to set the view content (within the InitializeMapControl method in MapControlDockpane.xaml.cs). This Create method has many overloads. This particular overload might be exactly what you need: (Note the first parameter which takes a list of any layers you need) Create Method: http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic12607.html public static MapControlContent Create( IEnumerable<Layer> layers, Envelope initialExtent, MapViewingMode viewingMode ) 2. MapControl's zoom extent is also defined when you create the content using the Create method (the envelope parameter). In the sample, I am listening to the ActiveMapViewChangedEvent and MapViewCameraChangedEvent events and modifying the MapControl's extent to match that. You can remove that for your workflow and set the MapControl's content the way you want it to be. Thanks Uma
... View more
11-01-2018
12:03 PM
|
0
|
2
|
1519
|
|
POST
|
Hi Here are some snippets for working with Raster/Mosaic datasets: ProSnippets Raster Thanks Uma
... View more
11-01-2018
11:31 AM
|
0
|
0
|
601
|
|
POST
|
Hi Check out this wiki about custom setting for a Project and Application in ArcGIS Pro: ProGuide: Custom settings Thanks Uma
... View more
10-29-2018
06:24 AM
|
0
|
0
|
557
|
|
POST
|
Hi Check out this sample: DatastoresDefinitionsAndDatasets It will show you how to create a browse dialog only for Filegeodatabases. It also shows you a few other filters you can use with the OpenItemDialog dialog. Here is the list of all the filters: ItemFilters Thanks Uma
... View more
10-26-2018
01:21 PM
|
2
|
1
|
1530
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-18-2025 03:09 PM | |
| 1 | 11-04-2025 08:25 AM | |
| 1 | 09-23-2025 09:31 AM | |
| 1 | 11-20-2024 10:50 AM | |
| 1 | 04-28-2025 03:06 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|