|
POST
|
Hi Than, Which specific Map Property are you changing when you see this behavior? Also, to confirm, the event you are using is "MapPropertyChangedEvent", correct? Thank you! Uma
... View more
12-11-2019
10:15 AM
|
0
|
3
|
1694
|
|
POST
|
With Pro, you can add content and images to an add-in and access them. Here is a wiki page that discusses this: ProGuide: Content and Image Resources
... View more
12-10-2019
03:34 PM
|
0
|
3
|
1337
|
|
POST
|
Hi Here are some snippets that could help you to get this information in Pro: 1.Get the Unique List of Maps From the Map Panes 2.Gets all the "MapProjectItems" Specifically, here are the code snippets - Get the map panes (map views): var mapPanes = ProApp.Panes.OfType<IMapPane>()
.GroupBy((mp) => mp.MapView.Map.URI).Select(grp => grp.FirstOrDefault()); Get all the map project items (maps in project): IEnumerable<MapProjectItem> newMapItemsContainer = project.GetItems<MapProjectItem>();
await QueuedTask.Run(() =>
{
foreach (var mp in newMapItemsContainer)
{
//Do Something with the map. For Example:
Map myMap = mp.GetMap();
}
}); Thanks Uma
... View more
12-10-2019
01:43 PM
|
0
|
1
|
786
|
|
POST
|
Hi Looks like Layout.SourceModifiedTime is not providing the correct info. The Layout development team is looking at this issue. I will update this post when there is a fix. Thank you! Uma
... View more
12-10-2019
01:33 PM
|
0
|
0
|
873
|
|
POST
|
Hi Thanks for reporting this one - I see the issue also. I will follow up with the development team to address this. Thanks! Uma
... View more
12-06-2019
10:56 AM
|
1
|
1
|
799
|
|
POST
|
If you are developing a custom tool in Pro, here is a code snippet to modify the tool's cursor: Change the cursor of a Tool
... View more
12-06-2019
08:36 AM
|
0
|
2
|
3409
|
|
POST
|
Hi Lesley The recommended way to store properties to be used across an add-in is to use the Module class file. In an add-in, you will have a Module1.cs class file. For convenience, the "Current" property is created in the add-in when you use the Pro SDK Templates to create an add-in. Instance properties in the Module1 class can be accessed across the add-in as Module1.Current.<PropertyName>. Static properties can be accessed directly using Module1.<StaticProperty>. You will see this pattern in many of the samples in the arcgis-pro-community-samples repository. Thanks Uma
... View more
12-04-2019
03:53 PM
|
2
|
1
|
559
|
|
POST
|
Hi Behroz, You are correct. That is exactly what I meant. Thanks! Uma
... View more
12-04-2019
02:38 PM
|
0
|
0
|
4869
|
|
POST
|
Hi, There is no built in functionality to flash graphic overlays. But you could write your own to simulate flashing - by adding/removing the graphic on a timer for example. Thanks Uma
... View more
12-04-2019
10:07 AM
|
0
|
2
|
4869
|
|
POST
|
To use the STA thread, you can use the StartSTATask method in the attached TaskUtils.cs file. Here is the usage for the method: await TaskUtils.StartSTATask<int>(() => {
//Do Polygonbuilder task here.
});
... View more
12-03-2019
04:06 PM
|
0
|
0
|
2627
|
|
POST
|
You can pass in a collection of OIDs to the FlashFeature method. Here is the method in the API Ref guide: FlashFeature
... View more
12-03-2019
02:49 PM
|
0
|
4
|
4869
|
|
POST
|
Hi Simon, You can create a layer from an item using this overload of the CreateLayer method: public Layer CreateLayer(
Item item,
ILayerContainerEdit mapOrGroupLayer,
int index,
string layerName
) You can apply your lyrX file's symbology to a layer in the active map using code similar to the snippet below: QueuedTask.Run( () => {
Item portalLayerLryxItem = ItemFactory.Instance.Create(lyrXPortalItemID, ItemFactory.ItemType.PortalItem);
var featureLayer = LayerFactory.Instance.CreateLayer(portalLayerLryxItem, MapView.Active.Map);
var lyrDocFromLyrxFile = new LayerDocument(featureLayer);
var cimLyrDoc = lyrDocFromLyrxFile.GetCIMLayerDocument();
//Get the renderer from the layer file
var rendererFromLayerFile = ((CIMFeatureLayer)cimLyrDoc.LayerDefinitions[0]).Renderer as CIMSimpleRenderer;
var featureLayerToApplySymbologyTo = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(f => f.Name.Contains("Cities")).FirstOrDefault(); ;
//Apply the renderer to the feature layer
featureLayerToApplySymbologyTo?.SetRenderer(rendererFromLayerFile);
}); Thanks Uma
... View more
12-02-2019
06:57 PM
|
0
|
0
|
1204
|
|
POST
|
Hi Victor, Here are the exact steps to use to get the fully qualified path: 1. Get the Datastore from the Dataset using Dataset.GetDatastore() 2. Get the path to the Datastore using Datastore.GetPath() 3. Append a \ character 4. Append the name of the dataset (Dataset.GetName()) Thanks! Uma
... View more
11-15-2019
03:38 PM
|
0
|
0
|
1677
|
|
POST
|
Hi Victor To get the underlying featureclass path from a feature layer you'll have to concatenate the datastore path and the featureclass name. A code snippet like this worked for me: var lyr = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
QueuedTask.Run( () => {
//get the underlying featureclass path for the layer
var fc = lyr.GetFeatureClass();
//get the datastore for the featureclass
var datastore = fc.GetDatastore();
//concat hydrant path (datastore and featureclass name)
var hydPath = datastore.GetPath().AbsolutePath + @"/" + fc.GetName();
}); Thanks Uma
... View more
11-13-2019
10:50 AM
|
0
|
2
|
1677
|
|
POST
|
Hi, The property to use is "CatalogPath". The Drag and Drop sample is available here in the community sample repo: Drag and Drop sample Thanks Uma
... View more
11-12-2019
07:30 AM
|
0
|
4
|
1677
|
| 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 |
Thursday
|