cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Skip exclusive access by code?

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!
1 Solution

Accepted Solutions
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
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.
Tomer1 wrote:
AC then asks if I want to open the file with exclusive access or as read only.
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.
But I still think the DGEnableAutoClose/DGDisableAutoClose solution could be better, because it's a solution for all other popup dialogs also.

Go to post

2 Replies 2
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
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.
Tomer1 wrote:
AC then asks if I want to open the file with exclusive access or as read only.
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.
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
Thanks. That was exactly what I looked for.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!