POST
|
Hi Drew You can accomplish this by using the ProjectClosingEvent. This is the code that worked for me - private static async Task OnProjectClosingAsync(CancelEventArgs arg)
{
FrameworkApplication.Panes.ClosePane(MyPaneID);
await Project.Current.SaveAsync();
} Thanks Uma
... View more
09-19-2017
09:29 AM
|
0
|
3
|
1531
|
POST
|
Hi Max Max These properties are not available in the Pro API at this time. We hope to add them to the API. Thanks! The SpatialReference definition can be obtained from its Wkt property. Thanks Uma
... View more
09-08-2017
03:23 PM
|
0
|
0
|
375
|
POST
|
Hi Brian To accomplish what you are doing, I would listen to the following events: * You need to know when a map is initialized and the TOC is available. This event will help with that - MapViewInitializedEvent * You will have to also listen to the ActiveMapViewChangedEvent to see when the active map view changes. * Finally you can listen to MapMemberPropertiesChangedEvent to see if new layers being added\removed affects your tool. * You might have to check the MapClosedEvent also. The ProceduralSymbolLayers sample does something very similar - If you check the Module class file of this sample. Thanks Uma
... View more
09-08-2017
09:57 AM
|
1
|
0
|
452
|
POST
|
Glad you found it! The IDs are listed in the Pro SDK wiki pages in this page: ArcGIS Pro DAML ID Reference You can also see them in Pro when you enable the control IDs to be displayed. Also, there is a Pro SDK Utility that you could use to get the DAML ids directly into you Add-in solution. ArcGIS Pro SDK for .NET utilities
... View more
09-08-2017
09:17 AM
|
1
|
0
|
1587
|
POST
|
To enable/disable your tool based on layers, you can use states and conditions. There is ConstructMarkerFromFont sample that demonstrates this.
... View more
09-07-2017
12:14 PM
|
0
|
3
|
998
|
POST
|
Hi You could use a ListBox WPF control for this. There are a few samples with Dockpanes with ListBox controls in the arcgis-pro-sdk-community-samples repo. The DockPaneBookmarkAdvanced sample will help since it has logic with zooming to bookmarks. Thanks Uma
... View more
09-07-2017
10:22 AM
|
0
|
1
|
528
|
POST
|
Hi Brian If you use EditOperation's Modify method you can move the point to a specific coordinate - QueuedTask.Run(() =>
{
//Get all of the selected ObjectIDs from the layer.
var abLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
var selection = abLayer.GetSelection();
var oid = selection.GetObjectIDs().FirstOrDefault();
var moveToPoint = new MapPointBuilder(1.0, 2.0, 3.0, 4.0, MapView.Active.Map.SpatialReference); //can pass in coordinates.
var modifyFeature = new EditOperation();
modifyFeature.Name = "Move features";
modifyFeature.Modify(abLayer, oid, moveToPoint.ToGeometry()); //Modify the feature to the new geometry
modifyFeature.Execute();
}); Also, the GeometryEngine has a "Distance" method that could be used to calculate the offset distance between 2 points (to plug into the "Move" method - For the original Move method snippet). Thanks Uma
... View more
09-05-2017
03:26 PM
|
2
|
6
|
1789
|
POST
|
Hi Alexander, The Pro Snippets are available on our GitHub wiki pages here. The snippets are not integrated into Visual Studio. Thanks Uma
... View more
08-25-2017
12:12 PM
|
1
|
1
|
853
|
POST
|
Hi Brian, This snippet below worked for me. The Move method has a couple of overrides you can use. Move method from Pro API Reference guide QueuedTask.Run(() =>
{
//Get all of the selected ObjectIDs from the layer.
var abLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
var selection = abLayer.GetSelection();
// set up a dictionary to store the layer and the object IDs of the selected features
var selectionDictionary = new Dictionary<MapMember, List<long>>();
selectionDictionary.Add(abLayer as MapMember, selection.GetObjectIDs().ToList());
var moveFeature = new EditOperation();
moveFeature.Name = "Move features";
moveFeature.Move(selectionDictionary, 10, 10); //specify your units along axis to move the geometry
moveFeature.Execute();
});
... View more
08-25-2017
12:10 PM
|
0
|
8
|
1789
|
POST
|
Hi, These are a few ways to check for a layer: //Finds a layer using a URI.
//The Layer URI you pass in helps you search for a specific layer in a map
var lyrFindLayer = MapView.Active.Map.FindLayer("CIMPATH=map/u_s__states__generalized_.xml");
//This returns a collection of layers of the "name" specified. You can use any Linq expression to query the collection.
var lyrExists = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Any(f => f.Name == "U.S. States (Generalized)");
//Finds layers by name and returns a read only list of Layers
var lyr = MapView.Active.Map.FindLayers("U.S. States (Generalized)").FirstOrDefault(); Thanks Uma
... View more
08-21-2017
12:44 PM
|
1
|
0
|
1657
|
POST
|
Hi Brian You can use the "dependencies" tag in daml to accomplish what you need. You can read about this on this wiki: ProConcepts Advanced Topics: Control Order of loading using DAML Also- To update one of your "Groups" (defined in one add-in) with a button from another add-in you will have to use the "UpdateModule" tag. There is a sample WorkingWithDaml that does this. A little more info about "UpdateModule" from ProConcepts: Framework: Note: DAML elements within one file can alter or remove elements in other files. For example, an add-in may simply inject a single button into a ribbon group defined by another add-in. The following example shows a button being added to an existing tab beside a specific control: <updateModule refID="esri_mapping">
<groups>
<updateGroup refID="esri_mapping_navigateGroup">
<insertButton refID="acme_FullExtent" insert="before" placeWith="esri_mapping_zoomFullButton" separator="true"/>
</updateGroup>
</groups>
</updateModule> Thanks Uma
... View more
08-18-2017
11:59 AM
|
1
|
1
|
737
|
POST
|
Hi, Please select .NET Framework 4.6.1 in the drop down at the top of the New Project dialog (in the screenshot you have provided). This will display the templates. This is the minimum required framework version for ArcGIS Pro Add-ins. Thanks Uma
... View more
06-04-2017
12:55 PM
|
2
|
1
|
1474
|
POST
|
Hi This will be possible with the 2.0 release of the Pro SDK. We anticipate 2.0 to be released end of June. There will be a new Visual Studio item template that can be used to create a pane that is linked to an active map. When 2.0 is released, there will be Pro SDK Samples and guides to help with this. In the meantime, you could download the ArcGIS Pro 2.0 Beta to experiment with this functionality to get ready for the final release. Thanks Uma
... View more
05-24-2017
01:45 PM
|
2
|
1
|
1963
|
POST
|
Attached is an updated Web maps Gallery sample with the "categories".
... View more
05-12-2017
08:53 AM
|
1
|
0
|
1212
|
POST
|
Hi Janaki Pro does the wrapping of the button caption. Add-in developers don't have to do this. Thanks Uma
... View more
05-11-2017
03:44 PM
|
1
|
0
|
1104
|
Title | Kudos | Posted |
---|---|---|
1 | a week ago | |
1 | Wednesday | |
1 | Wednesday | |
1 | 2 weeks ago | |
1 | 3 weeks ago |
Online Status |
Online
|
Date Last Visited |
6 hours ago
|