C# How to close Autocad pop-up when saving an XRef programmatically?

468 Views Asked by At

I am new in using AutoCAD and I am trying to work with its API in C#.

At some point, I am trying to send a list of commands to save an external reference without the interference of the user.

SendCommand("_-REFEDIT OK All Yes REFCLOSE Save ");

But a blocking pop-up (dialog box) appears right after, pop-up image:

pop-up image

It can be closed only by clicking on it.

Can anyone tell me if there is a way to avoid this pop-up appearing or to close it programmatically?

Thanks

1

There are 1 best solutions below

1
On

Have you investigated setting the FILEDIA variable to 0 before running the command?

To quote:

Does not display dialog boxes. You can still request a file dialog box to appear by entering a tilde (~) in response to the Command prompt.