Author Topic: System Varaible For Dialog Box  (Read 5638 times)

0 Members and 1 Guest are viewing this topic.

SDETERS

  • Guest
System Varaible For Dialog Box
« on: August 23, 2011, 10:38:36 AM »
I do not get Dialog boxes any more in Autocad 2007.  What is the System variable that turns these back on?  I forgot.  Thanks

Jeff H

  • Needs a day job
  • Posts: 6150
Re: System Varaible For Dialog Box
« Reply #1 on: August 23, 2011, 10:41:52 AM »
FILEDIA?

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: System Varaible For Dialog Box
« Reply #2 on: August 23, 2011, 10:46:28 AM »
CMDDIA?
CAD Tech

Crank

  • Water Moccasin
  • Posts: 1503
Re: System Varaible For Dialog Box
« Reply #3 on: August 23, 2011, 11:28:04 AM »
Vault Professional 2023     +     AEC Collection

SDETERS

  • Guest
Re: System Varaible For Dialog Box
« Reply #4 on: August 23, 2011, 11:28:28 AM »
Woot there it is.  Thanks for the responses.  I did a search a couple times on here and could not find this. 

Thanks again

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: System Varaible For Dialog Box
« Reply #6 on: August 23, 2011, 01:15:36 PM »
one would think that autodesk would have fixed this issue by now, either that or make the software so it doesn't  'terminate abnormally'.
Or both... :evil:
Be your Best


Michael Farrell
http://primeservicesglobal.com/

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: System Varaible For Dialog Box
« Reply #7 on: August 23, 2011, 01:25:34 PM »
Hard for them to fix every example LISP on the internet which don't reset the FILEDIA value, no?   :?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: System Varaible For Dialog Box
« Reply #8 on: August 23, 2011, 01:30:15 PM »
And there are plenty of times when you don't want the dialog boxes popping up while you're running an automated routine.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

SDETERS

  • Guest
Re: System Varaible For Dialog Box
« Reply #9 on: August 23, 2011, 01:40:20 PM »
I crashed Autocad trying to import an IGES file.   :realmad:  After the crash no more dialog boxes.  It is now fixed. 

cadtag

  • Swamp Rat
  • Posts: 1152
Re: System Varaible For Dialog Box
« Reply #10 on: August 23, 2011, 01:46:03 PM »
On the other hand, it would _not_ be hard to add a snippet of information to the command line file prompt for any file open/save operation, something on the order of "Enter ~ to use a file dialog for this operation, or ! to reset the file dialogs to ON"

the first part already works, but is not well known.  the latter function could be added readily
« Last Edit: August 23, 2011, 02:01:20 PM by cadtag »
The only thing more dangerous to the liberty of a free people than big government is big business

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: System Varaible For Dialog Box
« Reply #11 on: August 23, 2011, 02:07:28 PM »
You could use a reactor to monitor the System Variables that are being changed, something like:

Code: [Select]
(setq *sysvars* '("FILEDIA" "CMDDIA")) ;; Sys Vars to monitor

(defun c:svrON nil
    (if (null *sysvarreactor*)
        (setq *sysvarreactor*
            (vlr-sysvar-reactor nil
               '(
                    (:vlr-sysvarchanged    . notify)
                    (:vlr-sysVarWillChange . getvalue)
                )
            )
        )
        (princ "\nSystem Variable Reactor already running.")
    )
    (princ)
)

(defun c:svrOFF nil
    (if *sysvarreactor*
        (progn (vlr-remove *sysvarreactor*) (setq *sysvarreactor* nil))
        (princ "\nSystem Variable Reactor not running.")
    )
    (princ)
)

(defun getvalue ( reactor params )
    (if (member (strcase (car params)) *sysvars*)
        (setq *value* (getvar (car params)))
    )
    (princ)
)

(defun notify ( reactor params )
    (if
        (and
            (cadr params)
            (member (strcase (car params)) *sysvars*)
            *value*
        )
        (progn
            (princ
                (strcat
                    "\n" (car params) " changed from "
                    (vl-princ-to-string *value*) " to "
                    (vl-princ-to-string (getvar (car params)))
                )
            )
            (setq *value* nil)
        )
    )
    (princ)
)

(vl-load-com) (princ)

Type 'svrON' to start the reactor, and 'svrOFF' to turn it off.

Now, when a System Variable is changed:

Code: [Select]
Command: filedia

Enter new value for FILEDIA <1>: 0

FILEDIA changed from 1 to 0

 :-)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: System Varaible For Dialog Box
« Reply #12 on: August 23, 2011, 04:09:26 PM »
I crashed Autocad trying to import an IGES file.   :realmad:  After the crash no more dialog boxes.  It is now fixed.
This is the issue that I was specifically speaking to in my post. Not the results of BAD coding habits, or even bad code in general.  As one would anticipate that someone writing code would turn the dialog boxes on and or off as required by their code, as well as setting the requisite value for expert mode.

The issue is that the software does terminate abnormally, i.e. CRASHES. Autodesk knows this and yet it still allows those two variables (CMDDIA, and FILEDIA) to get switch off when one restarts from said crash. Given that they even wrote a Recovery Manager we know they must know that their applications can and do crash.  It would have probably taken less effort to make those variables NON VOLATILE than it took to create the Recovery Manager.

And then this issue that has been around for DECADES would be gone.
Be your Best


Michael Farrell
http://primeservicesglobal.com/