Jump to content

GETFILED save file - shows "overwrite" confirmation dialog box twice


vanowm

Recommended Posts

Hello.

 

I'm using Autocad 2000i/2002. Having a simple line to show save file dialog box:

(GETFILED "" "" "" 13)

If a file already exists it shows confirmation dialog:

 

attachment.php?attachmentid=54893&cid=1&stc=1

 

That's good, but once clicked yes it shows this:

 

attachment.php?attachmentid=54894&cid=1&stc=1

 

Any suggestions on how to avoid second dialog?

Perhaps it could be done with vba?

 

Thank you.

overwrite1.PNG

overwrite2.PNG

Link to comment
Share on other sites

One work around is to use bit 32 to suppress confirmations all together and then display custom confirmation dialog box

(setq filename (getFile (GETFILED "" "" "" 45)))

(DEFUN getFile (file / retry)
   (SETQ retry T)
   (WHILE retry
       (IF (SETQ file (GETFILED "" file "plt" 45))
           (PROGN
               (SETQ reply (ACET-UI-MESSAGE
                               (STRCAT file " already exists.\nDo you want to replace it?")
                               "Confirm save as"
                               (+ Acet:YESNOCANCEL Acet:ICONWARNING)
                           )
               )
               (IF (NOT (= reply Acet:IDNO))
                   (PROGN
                       (SETQ retry nil)
                       (IF (= reply Acet:IDCANCEL)
                           (SETQ file nil)
                       )
                   )
               )
           )
           (SETQ retry nil)
       )
   )
   file
)

(requires express tools)

Link to comment
Share on other sites

Yes, same result with any combination of bits 1 and 4, 8

 

 

Testing with fresh windows 7 SP1 32/64bit and fresh Autocad 2002

Edited by vanowm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...