SOLVED!
Skip exclusive access by code?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-09-02
03:01 PM
- last edited on
2021-09-14
01:48 PM
by
Noemi Balogh
2020-09-02
03:01 PM
Hi!
So my goal is to open a file and to run some functions on the opened file. I am able to do that with catchprojectevent, but my problem is when the file is already opened. AC then asks if I want to open the file with exclusive access or as read only.
Is there a way to skip the message box? And choose one of it’s options automatically by code?
Thank you!
So my goal is to open a file and to run some functions on the opened file. I am able to do that with catchprojectevent, but my problem is when the file is already opened. AC then asks if I want to open the file with exclusive access or as read only.
Is there a way to skip the message box? And choose one of it’s options automatically by code?
Thank you!
Solved! Go to Solution.
Labels:
- Labels:
-
Add-On (C++)
1 ACCEPTED SOLUTION
Accepted Solutions
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-09-03 09:25 AM
2020-09-03
09:25 AM
Hi Tomer1,
If you are implementing an automation, then all the dialogs will stuck your process. I recommend you the DGEnableAutoClose function (include DG.h). This function will automatically close all the popup dialogs. Please note that it's equivalent with clicking to the default button on the dialogs.
Do not forget to call DGDisableAutoClose after your automation finished working.
But I still think the DGEnableAutoClose/DGDisableAutoClose solution could be better, because it's a solution for all other popup dialogs also.
If you are implementing an automation, then all the dialogs will stuck your process. I recommend you the DGEnableAutoClose function (include DG.h). This function will automatically close all the popup dialogs. Please note that it's equivalent with clicking to the default button on the dialogs.
Do not forget to call DGDisableAutoClose after your automation finished working.
Tomer1 wrote:AC asks this when the file is used by other process, locked. If you delete the lockfile next to the project file, then your issue can be solved.
AC then asks if I want to open the file with exclusive access or as read only.
But I still think the DGEnableAutoClose/DGDisableAutoClose solution could be better, because it's a solution for all other popup dialogs also.
2 REPLIES 2
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-09-03 09:25 AM
2020-09-03
09:25 AM
Hi Tomer1,
If you are implementing an automation, then all the dialogs will stuck your process. I recommend you the DGEnableAutoClose function (include DG.h). This function will automatically close all the popup dialogs. Please note that it's equivalent with clicking to the default button on the dialogs.
Do not forget to call DGDisableAutoClose after your automation finished working.
But I still think the DGEnableAutoClose/DGDisableAutoClose solution could be better, because it's a solution for all other popup dialogs also.
If you are implementing an automation, then all the dialogs will stuck your process. I recommend you the DGEnableAutoClose function (include DG.h). This function will automatically close all the popup dialogs. Please note that it's equivalent with clicking to the default button on the dialogs.
Do not forget to call DGDisableAutoClose after your automation finished working.
Tomer1 wrote:AC asks this when the file is used by other process, locked. If you delete the lockfile next to the project file, then your issue can be solved.
AC then asks if I want to open the file with exclusive access or as read only.
But I still think the DGEnableAutoClose/DGDisableAutoClose solution could be better, because it's a solution for all other popup dialogs also.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-09-08 11:07 AM
2020-09-08
11:07 AM
Thanks. That was exactly what I looked for.