Forbid creating new project/open project in Pro Configuration

801
4
Jump to solution
02-15-2021 02:46 AM
RehmSoftware
New Contributor III

Hi,

I have created a Pro Configuration for ArcGIS Pro and through that configuration either a new project is created or a specific existing project is opened upon startup. So after ArcGIS is initialized and ready, a project is open. Now I wonder if there's a way to disable the "new project"/"open project"/"save as"-functionality in ArcGIS Pro since I don't want the user to work with a different project as long as my configuration is active. I worked around by subscribing to ProjectOpened/Saved-Events and then disabling conditions so my Add-In is not active anymore and I also used ConfigurationManager.OnCanExecuteCommand to disable new/open from the QAT.. but the user can still do it from the "Project"-Tab that's always present.

Did I miss something or is this functionality not yet implemented?

Thanks in advance

Christian

1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

Hi,

To delete the New Project and Open Project tabs, these DAML line will do the trick:

Backstage tab: Delete Pro's tabs and insert your own tab 

Thanks

Uma

 

 

View solution in original post

4 Replies
GintautasKmieliauskas
Regular Contributor

Hi,

In your configuration daml file you can modify existing ArcGIS Pro ribbons, menus and etc. For example delete New project, Open project or etc. tools/commands. You just need to know module id and tool/command IDs

0 Kudos
RehmSoftware
New Contributor III

Hi,

 

that was already a nod in the right direction.. I came up with this:

	  <updateModule refID="esri_core_module">
		  <controls>
			  <deleteButton refID="esri_core_newProjectButton" />
			  <deleteButton refID="esri_core_openProjectButton" />
			  <deleteButton refID="esri_core_saveProjectAsButton" />
		  </controls>
	  </updateModule>

And looking at the QAT, it worked:

QAT.png

But I can still create/open projects in the "project tab":

RibbonTab.png

I browsed through the DAML IDs in this link: https://github.com/Esri/arcgis-pro-sdk/wiki/DAML-ID-Reference-ADCore.daml

But I couldn't figure out which ones I need to add to updateModule to get rid of new/open project in the "project tab"

0 Kudos
UmaHarano
Esri Regular Contributor

Hi,

To delete the New Project and Open Project tabs, these DAML line will do the trick:

Backstage tab: Delete Pro's tabs and insert your own tab 

Thanks

Uma

 

 

RehmSoftware
New Contributor III

Thank you Uma, that did the trick.. I wasn't aware that what I was calling "project tab" is referred to as backstage :)

0 Kudos