FILEDIA turned off during FILEOPEN?

HI,

So we have a couple of custom programs that we use a lot at our office which usually turn FILEDIA On and Off.
Sometimes, Bricscad crashes and upon crashing, the custom program did not have the time to set FILEDIA to On. It then prevents our users to access the open dialog box when opening Bricscad again.

This is indeed an easy fix, simply turn back on FILEDIA. but it scares most of our unaware users.
So i came up with the idea of adding a simple test in the ON_DOC_LOAD file which checks if FILEDIA is turned Off upon drawing opening and sets it back On if so.

To my suprise, it seems that FILEDIA is always detected as turned OFF, even though it is clearly On when i check the variable once the drawing is fully opened.

To test this, i simply tryed to add the line (if (= (getvar 'filedia) 0) (princ "\nFILEDIA WAS TURNED OFF!")) at the end of my ON_DOC_LOAD on a blank Bricscad install and i got the message, even when FILEDIA = 1.

Is this normal behavior of ON_DOC_LOAD or FILEOPEN? it shuts off some system variables?

(I'm using Bricscad v21.02.06)

Comments

  • I don't see that problem in my v17. I put your function in my on_doc_load.lsp file and never got the message. Then I added an Else message:
    (if (= (getvar 'filedia) 0) (princ "\nFILEDIA WAS TURNED OFF!") (princ "\nFILEDIA IS ON") )
    and then I always got "FILE DIA IS ON" when I opened a file.

  • Yes, i get the same result as you Anthony in v13 and V19 (expected behavior = On).

    Can someone with v21 confirm this please?

  • Anthony Apostolaros
    edited September 2021

    @1LandSurveyor said:
    .....
    So i came up with the idea of adding a simple test in the ON_DOC_LOAD file which checks if FILEDIA is turned Off upon drawing opening and sets it back On if so.

    I don't understand why you even need the test. Why not just put (setvar "filedia" 1) in the on_doc_load.lsp file? It sounds like you're planning to do that anyway, so why not just do it without the test? Or are you planning to turn it off if the test shows it's on?