Select to view content in your preferred language

Close ArcGIS Pro Application Without Saving

1178
1
07-19-2017 11:47 AM
GabyGutierrez1
Deactivated User

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?

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