Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto set "DisplayFileAlerts=False" when use "export_data (... overwrite=True)" #221

Closed
Zcaic opened this issue Jun 29, 2024 · 2 comments
Closed
Assignees

Comments

@Zcaic
Copy link

Zcaic commented Jun 29, 2024

Hello, I found it's good that when I use save_as(... overwrite=True) ,the DisplayFileAlerts will be auto set to be False.
But when I export stp format with command export_data (... overwrite=True), the DisplayFileAlerts won't be set to be False.

It is easy to change below codes in document.py file

   line 476     if overwrite is False and file_name.is_file():
   line 477         raise FileExistsError(f'File: {file_name} already exists. '
   line 478                               f'Set overwrite=True if you want to overwrite.')

to:

        if overwrite is False:
            if path_file_name.is_file():
                raise FileExistsError(f'File: {path_file_name} already exists. '
                                      f'Set overwrite=True if you want to overwrite.')
        else:
            self.document.Application.DisplayFileAlerts = False
@evereux
Copy link
Owner

evereux commented Jul 1, 2024

I've submitted a fix for this which will be in 0.7.3 release.

Thanks for reporting.

@evereux
Copy link
Owner

evereux commented Jul 13, 2024

0.7.3 has now been released.

@evereux evereux closed this as completed Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants