|
POST
|
Strange, didn't work for me anymore either 🙂 Hope this link works: https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-net
... View more
08-07-2017
09:35 AM
|
0
|
0
|
1420
|
|
POST
|
DockPanes are implemented using MVVM meaning that the business (or code-behind) logic is defined in the 'DockPane1ViewModel' class and the UI is defined in the 'DockPane1View' class. I think your code snippet above is confusing View and ViewModel. To get a reference for a 'test' method that I defined in my DockPane1ViewModel class I can use this snippet: DockPane pane = FrameworkApplication.DockPaneManager.Find("ProAppModule15_Dockpane1");
if (pane == null) return;
// Cast to my specific implementation
Dockpane1ViewModel panevm = pane as Dockpane1ViewModel;
if (panevm != null) MessageBox.Show(panevm.test()); However, if you want to get a handle to your VIEW (i.e. in my case this is the DockPaneView1 class), then you need to implement your own access method in your DockPaneView1 class. Remember that dockpanes are always singletons in ArcGIS Pro so there is always only one instance of your view at a time. Here is sample of an access method that allows me to reference my View class 'DockPane1View': public partial class Dockpane1View : UserControl
{
public Dockpane1View()
{
InitializeComponent();
// set _this property here:
_this = this;
}
private static Dockpane1View _this = null;
// static method to get reference to my DockpaneView instance
static public Dockpane1View MyDockpaneView => _this;
// sample method
public string test ()
{ return "test1"; }
} Now I can call the 'test' method above from anywhere like this: Dockpane1View myView = Dockpane1View.MyDockpaneView;
MessageBox.Show (myView.test());
... View more
08-04-2017
01:40 PM
|
1
|
1
|
2788
|
|
POST
|
Hi Brian, In order to show a Dockpane you have to add the Dockpane to the config.daml first. I would use the 'Dockpane Item Template' to do this to make sure that all your code is stubbed out properly. Once you do this you can see the Dockpane definition in your config.daml: <dockPanes>
<dockPane id="ProAppModule15_Dockpane1" caption="Dockpane 1" className="Dockpane1ViewModel" dock="group" dockWith="esri_core_contentsDockPane">
<content className="Dockpane1View" />
</dockPane>
</dockPanes> There is also a button to show the Dockpane, but you can remove the button later after you show the Dockpane from your add-in's MapTool. To show the code from within your MapTool you can simply use the code snippet from that button's OnClick method: // the Show method is static can automatically stubbed out
// so you can call Show directly from your add-in code:
Dockpane1ViewModel.Show();
or you can copy the activation code from the Show method and create your 'own' show method (this will work even if your MapTool is in a separate add-in component): // this is the ID from the dockpane definition in the config.daml file
string _dockPaneID = "ProAppModule15_Dockpane1";
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
if (pane == null) return;
pane.Activate();
... View more
08-04-2017
12:31 PM
|
0
|
3
|
2788
|
|
POST
|
Hi Renee, you posted your question under 'ArcGIS Pro SDK', however, if you re-post your question in one of the ArcGIS Runtime SDK communities you will get better coverage. i.e. https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-net
... View more
08-04-2017
09:29 AM
|
1
|
2
|
1420
|
|
POST
|
I would first check the desktopversion attribute of the AddInInfo tag in the config.daml file. If you created the add-in with a pre 2.0 version of the SDK the add-in is not run-time compatible with ArcGIS Pro 2.0. If you migrate a 1.x add-in to 2.0 you have to change the desktopversion attribute to 2.0.0 as well (when you recompile your add-in) for your add-in to work under 2.0. We provided an FAQ with some links for more detailed information on how to diagnose this issue: https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ#why-does-arcgis-pro-not-load-my-add-in . There is also a ProConcept document on migrating to 2.0: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-2.0-Migration-Guide
... View more
08-02-2017
04:49 PM
|
0
|
1
|
1759
|
|
POST
|
Hi Matthew, I was not able to duplicate your scenario. Just to recap, you have an existing add-in project (c#) and you try to add a new add-in template item to your existing project. At the point right after you "drill down" to the "ArcGIS Pro Add-ins" item templates selection list you get an error pop-up? I tried this exact scenario and didn't get the error message. Just to make sure that the setup worked properly can you please try the following and then retest: Open a "Developer Command Prompt for VS2015" command running as Administrator (under applications, Visual Studio 2015 folder) Close all instances of Visual Studio In the command prompt run this command: devenv /setup Note: if you get the error "The operation could not be completed. The requested operation requires elevation." you have to open the VS 2015 command prompt by 'running it as Administrator'. After the /setup command completes try your scenario once more.
... View more
08-02-2017
04:30 PM
|
0
|
1
|
2932
|
|
POST
|
Hi Brian, You probably noticed by now that there are some significant differences between ArcObjects and the ArcGIS Pro SDK. If you are new to the ArcGIS Pro SDK I would recommend to look at some the 'ProConcept' documents we provide on our documentation wiki: https://github.com/Esri/arcgis-pro-sdk/wiki . Needless to say samples are always helpful (which you already discovered) and so are our ProSnippets which are in essence small copy/paste ready snippets that perform a specific task. In case you haven't tried this there are quite a few technical sessions on YouTube, you can find them searching for "arcgis pro sdk for .net".
... View more
08-02-2017
10:57 AM
|
0
|
0
|
990
|
|
POST
|
Hi Brian, There is no need to recompile your add-in each time a new version of ArcGIS Pro is released. The following ProConcept explains the topic of add-in versioning in detail: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Advanced-Topics#add-in-versioning In essence there is a difference between major version releases (like 1.x, 2.x, or 3.x) and minor version releases (like 2.1, 2.2, and 2.3): only major version upgrades need to be recompiled whereas minor version releases are forward compatible, as shown in this quote from the above ProConcept: Add-ins and configurations are forwards compatible across all minor versions of ArcGIS Pro. Add-ins and configurations are not forward compatible across major versions (eg 2.x, 3.x, etc). You are correct in your guess that the ArcGIS Pro API is continuously changing, however, to maintain forward compatibility between minor versions features are only added to the API with minor version revisions.
... View more
08-02-2017
09:53 AM
|
1
|
1
|
2046
|
|
POST
|
This Pro Concept explains add-in compatibility for ArcGIS Pro releases: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-2.0-Migration-Guide.
... View more
08-01-2017
12:12 PM
|
2
|
0
|
2046
|
|
POST
|
Ok I see what you're trying to do now. In general the SDK distinguishes between add-ins and [managed] configurations, therefore we have also two different project templates for both options (one for add-ins and one for managed configurations). Add-ins will run with every instance of ArcGIS Pro that is started on a machine, as long as the add-in package has been copied into a location that is recognized by ArcGIS Pro's add-in manager and permissions allow the add-in to run. Therefore many enterprise customers simply configure a shared network folder connection on all machines that is recognized by ArcGIS Pro's add-in manager. Now you can simply copy the latest version of your add-in to that shared location and your users are automatically able to run your add-in. If an add-in is distributed to the public then the ArcGIS Marketplace or ArcGIS Online can be used to distribute that add-in and the built-in ArcGIS Pro installer makes sure that the add-in is properly installed. Configurations are a bit different from add-ins as they can only be run by either specifying the configuration name in a shortcut (using the /config command line parameter) or using the registry to force your configuration on ALL instances of running ArcGIS Pro. You can read more about that here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations#runtime So yes if you like a give your users a 'turn-key' experience for a 'managed configuration' (option 2 above) then a setup or windows installer is needed to copy the configuration package, and then create a shortcut or define the required registry key.
... View more
07-24-2017
09:43 AM
|
1
|
2
|
1248
|
|
POST
|
I tried your code snippet (in VB) and didn't get any errors. Are you able to open the Attribute tables from within ArcGIS Pro? If not it's probably a good idea to refresh your display device drivers to the latest available version. However, if it works from within Pro I would first look and make sure there are NO other add-ins running at the time. To check you can delete all files from the well-known add-ins location, or when you open Pro you can click on 'About ArcGIS Pro' and then use the add-in manager to remove all existing add-ins. Then I would recompile the sample and try again. It is possible that the error you see is getting thrown by another add-in that is still running without your knowledge.
... View more
07-21-2017
07:50 AM
|
0
|
1
|
1636
|
|
POST
|
To close Pro programmatically without saving you can first set the project's Dirty flag to false as documented here: https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9210.html and then close the Pro application: FrameworkApplication.Close();
... View more
07-19-2017
12:19 PM
|
0
|
0
|
1400
|
|
POST
|
Jodi is correct this code snippet below opens the attribute table for the current select feature layer in the Content Dockpane: protected override void OnClick()
{
var cmdOpenAttributeTable = FrameworkApplication.GetPlugInWrapper("esri_editing_table_openTablePaneButton") as ICommand;
if (cmdOpenAttributeTable != null)
{
if (cmdOpenAttributeTable.CanExecute(null))
{
cmdOpenAttributeTable.Execute(null);
}
}
} DAML Ids for built-in commands are listed here: https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference And in order to select a feature layer in the TOC you can use the snippet below: https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-MapExploration#select-all-feature-layers-in-toc Put the two snippets together you get the following solution which opens the attribute tables for all feature layers: protected override void OnClick()
{
//Get the active map view.
var mapView = ArcGIS.Desktop.Mapping.MapView.Active;
if (mapView == null)
return;
//Zoom to the selected layers in the TOC
var featureLayers = mapView.Map.Layers.OfType<FeatureLayer>();
mapView.SelectLayers(featureLayers.ToList());
var cmdOpenAttributeTable = FrameworkApplication.GetPlugInWrapper("esri_editing_table_openTablePaneButton") as ICommand;
if (cmdOpenAttributeTable != null)
{
if (cmdOpenAttributeTable.CanExecute(null))
{
cmdOpenAttributeTable.Execute(null);
}
}
}
... View more
07-18-2017
02:19 PM
|
1
|
4
|
1636
|
|
POST
|
Windows Installer packages are not needed to install an ArcGIS Pro add-ins. There are two ways to install your add-in (which will always have a file extension of .esriAddInX): is by double clicking the file on the client machine (which is what you did on the post above) or by copying the .esriAddInX file into the well-known (or added) folder for Pro Add-ins (by default that's "ArcGIS\AddIns\ArcGISPro" folder in your documents folder) By looking at your posts above I was not able to tell which version your add-in was built for, nor what version of ArcGIS Pro you trying to install the add-in on. I would suggest that you match the version of ArcGIS Pro and the ArcGIS Pro SDK when you develop add-ins. If you are running version 2 of ArcGIS Pro and developed the add-in before version 2.0 please take a look at migration issues documented here: https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ#20-migration If your add-in appears in the add-in list on the client machine that means that Pro found the add-in, however, Pro will not automatically run the add-in, instead Pro looks at your config.daml file to match the desktopVersion attribute under the AddInInfo tag. Make sure that the desktopVersion matches the version of ArcGIS Pro on the client. ...
<AddInInfo id="{your id guid}" version="your add-in version" desktopVersion="2.0">
...
... View more
07-18-2017
01:50 PM
|
0
|
4
|
3225
|
|
POST
|
You can look at these snippets: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Content#new-project these will create a new 'empty' project. Additional snippets allow you to create a new project using a template. Also you can use the following snippet to add a new map (if the project doesn't contain a map) using this snippet: https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-MapAuthoring#create-a-new-map-with-a-default-basemap-layer
... View more
07-07-2017
10:46 AM
|
0
|
0
|
676
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-30-2025 12:03 PM | |
| 1 | 10-06-2025 01:19 PM | |
| 1 | 10-06-2025 10:37 AM | |
| 1 | 09-24-2025 09:12 AM | |
| 1 | 07-15-2022 07:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-10-2025
11:48 AM
|