Close ArcGIS Pro Application Without Saving

291
1
07-19-2017 11:47 AM
New Contributor

Hello,

I'm having some trouble programmatically closing the ArcGIS Pro application without saving. In the past, I was able to call the close command and just use the SendKeys function to send "n" when I was working with ArcMap. I've tried both the Send() and SendWait() functions but it still doesn't seem to work. Any ideas?

Reply
0 Kudos
1 Reply
by Esri Regular Contributor
Esri Regular Contributor

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();
Reply
0 Kudos