|
POST
|
Hi Taner It is not possible to add Text graphics to the overlay at this point. This is being considered for a future release of Pro. Thanks Uma
... View more
12-20-2017
09:33 AM
|
0
|
0
|
1029
|
|
POST
|
Hi Your code looks correct. I was able to reproduce the problem. This has been fixed in 2.1. Thank you! Uma
... View more
12-11-2017
06:45 PM
|
0
|
0
|
689
|
|
POST
|
Hi, I have used the Code Converter in this site to convert code from C# to VB. Thanks Uma
... View more
11-27-2017
01:28 PM
|
0
|
0
|
595
|
|
POST
|
Hi, You can use the MapViewCameraChangedEvent for this. http://pro.arcgis.com/en/pro-app/sdk/api-reference/index.html#topic12830.html The ViewExtentChanged event is in an internal namespace - they could change anytime. So not recommended to use anything from a Pro API Internal namespace. Also, there are a couple of samples in the arcgis-pro-sdk-community-samples that uses the MapViewCameraChangedEvent. Thanks Uma
... View more
11-26-2017
06:52 PM
|
0
|
0
|
1602
|
|
POST
|
Hi Michael, You should be able to adjust the settings of a MapFrame in a Layout using the SetCamera method. Check out the code snippets on this page of the API Reference guide: topic11124.html Thanks! Uma
... View more
10-26-2017
04:05 PM
|
1
|
0
|
8874
|
|
POST
|
Hi By using subscription tokens you can subscribe\unsubscribe when the dockpane is visible\hidden. This code below worked for me: private SubscriptionToken _eventToken = null;
protected override void OnShow(bool isVisible)
{
if (isVisible && _eventToken == null)
{
_eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent);
}
if (!isVisible && _eventToken != null)
{
MapSelectionChangedEvent.Unsubscribe(_eventToken);
_eventToken = null;
}
}
private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs obj)
{
MessageBox.Show("Selection has changed");
} Thanks Uma
... View more
10-26-2017
08:28 AM
|
0
|
0
|
574
|
|
POST
|
Hi When you open a project with a Map View, you can wait for the MapView to initialize by subscribing to the "MapViewInitialized" event (topic12855.html). Important thing to note is that when you open a new view in your project, this event will be triggered again. If you want to subscribe to the MapViewInitialized event as a one shot per project, you will have to: Unsubscribe after the MapView has initialized the first time when the project opens. Then subscribe to the ProjectOpenedEvent and then check if the MapView is again initialized. (for subsequent Project open routines) Here is a code snippet to subscribe and unsubscribe to the MapViewInitialized event. private SubscriptionToken _eventToken = null;
protected override bool Initialize() //Module initialized
{
_eventToken = MapViewInitializedEvent.Subscribe(OnMapViewInitialized);
return base.Initialize();
}
private void OnMapViewInitialized(MapViewEventArgs args)
{
MessageBox.Show("MapView has been initialized");
if (_eventToken != null)
{
ArcGIS.Desktop.Mapping.Events.MapViewInitializedEvent.Unsubscribe(_eventToken);
_eventToken = null;
}
} Thanks Uma
... View more
10-25-2017
02:00 PM
|
2
|
0
|
5316
|
|
POST
|
Hi Michael The LabelClass' Expression property can be used. Like this: theLabelClass.Expression = "$feature.POP2000"; Another thing you might find helpful while working with the CIM is to use the arcgis-pro-sdk-cim-viewer. This will give a view of all the CIM objects, properties that you can manipulate for what you need. Thanks Uma
... View more
10-25-2017
09:38 AM
|
1
|
3
|
8852
|
|
POST
|
Hi You can access the Feature Layer's LabelClasses and the TextSymbol through the CIM to accomplish this. Here is a snippet: private void ChangeLabel(FeatureLayer lyr)
{
var lyrDefn = lyr.GetDefinition() as CIMFeatureLayer;
var listLabelClasses = lyrDefn.LabelClasses.ToList();
var textSymbol = listLabelClasses.FirstOrDefault().TextSymbol.Symbol as CIMTextSymbol; //Gets the text symbol of the label class
textSymbol.FontStyleName = "Bold"; //set font as bold
textSymbol.SetSize(10); //set font size
//Text symbol might not have a halo.
//So need to create a halo symbol (polygon with a solid fill layer)
var haloFill = new CIMSolidFill
{
Enable = true,
Color = ColorFactory.Instance.RedRGB,
ColorLocked = false
};
//Define the array of Symbol layers (holds the halo solid fill only)
var symbolLyrs = new CIMSymbolLayer[]
{
haloFill
};
//Creates the Polygon symbol with the halo solid fill layer
var haloSymbol = new CIMPolygonSymbol
{
SymbolLayers = symbolLyrs
};
//Assign this halo symbol and its size to the text symbol
textSymbol.HaloSymbol = haloSymbol;
textSymbol.HaloSize = 1;
lyrDefn.LabelClasses = listLabelClasses.ToArray(); //Set the labelClasses back
lyr.SetDefinition(lyrDefn); //set the layer's definition
} Thanks Uma
... View more
10-25-2017
06:04 AM
|
3
|
6
|
8874
|
|
POST
|
Hi, You can subscribe to the ProjectOpenedEvent (topic9319) to accomplish this. Additionally, the add-in will need to load as soon as Pro launches, so you will have to set the "autoload" attribute to true in the config.daml of the add-in. Code snippets below: In the Module class of the add-in: protected override bool Initialize()
{
ProjectOpenedEvent.Subscribe(OnProjectOpened); //subscribe to event
return base.Initialize();
}
private void OnProjectOpened(ProjectEventArgs obj)
{
MessageBox.Show($"{Project.Current} has opened"); //show your message box
}
protected override void Uninitialize()
{
ProjectOpenedEvent.Unsubscribe(OnProjectOpened); //unsubscribe
return;
} In your config.daml, set the autoload attribute to true so that the add-in loads when Pro launches: ...
<modules>
<insertModule id="SubscribeProjectLoad_Module" className="Module1" autoLoad="true" caption="Module1">
... Thanks Uma
... View more
10-24-2017
02:09 PM
|
3
|
0
|
1287
|
|
POST
|
Hi, You can use the ActiveMapViewChangedEvent class. In the arcgis-pro-sdk-community-samples repo there are a few samples that demonstrate this. Search the repo for the text "activeMapViewChangedEvent" to find the sample. Thanks! Uma
... View more
10-20-2017
02:48 PM
|
2
|
0
|
1133
|
|
POST
|
Hi, There is a new ProGuide: Custom Settings that walks you through how to create custom project and application level settings using an add-in. Thanks Uma
... View more
10-20-2017
10:54 AM
|
1
|
0
|
768
|
|
POST
|
Hi When you use the Pro SDK Embeddable Control item template to create the control, the text is centered in the xaml - Horizontal and vertical alignments are set as "Center". Code snippet created by the SDK Template give below. Can you please share your xaml snippet in your add-in to see why the text is not centered. Thanks! Uma XAML from the embeddable control item template: <Grid>
<TextBlock Text="{Binding Text}" HorizontalAlignment="Center"
VerticalAlignment="Center" Margin="4"/>
</Grid>
... View more
10-17-2017
08:19 AM
|
0
|
0
|
682
|
|
POST
|
Hi, You can specify additional well known folder from where ArcGISPro.exe will probe for and load a proConfigX file. Refer to the Configurations Loading scheme topic for information on the ConfigurationsFolder registry key that can be used for this. If you set the registry key specified in this topic on the client computers, you can place your configuration in the network share and the shortcut below will launch your configuration. "C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe" /config:Pro.proConfigX Thanks Uma
... View more
10-16-2017
02:12 PM
|
2
|
1
|
814
|
| 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 |
a week ago
|