PDA

View Full Version : profile changing...



eleonard
2005-11-21, 10:48 PM
I currently have set up a machine to log information. The person i am training claims that she hasn't played with the profile at all. But I am no longer getting logs. Is it possible that these settings will automatically change?

Mike.Perry
2005-11-21, 10:53 PM
Hi

Anything is possible...

But in this case, unlikely ( I would guess ).

Are you referring to the Log file that is controlled by LogFileMode ?

Have a good one, Mike

eleonard
2005-11-21, 10:57 PM
Are you referring to the Log file that is controlled by LogFileMode ?

The log i am refering to is the one that you can set under the options dialog box. I have this set to log to a network folder which has been working just fine up until lunch time today.

Mike.Perry
2005-11-21, 11:02 PM
The log i am refering to is the one that you can set under the options dialog box. I have this set to log to a network folder which has been working just fine up until lunch time today.Hi

That is the one controlled by LogFileMode, therefore you could look at using a tiny bit of LISP, VBA etc to help control this file ie

* Check if LogFileMode is "on".
* If not "on" turn it "on".

Have a good one, Mike

Opie
2005-11-21, 11:27 PM
You could place the following code in your startup routine.
(defun EL:RLF ( / cmde )
(setq cmde (getvar "cmdecho"))
(setvar "cmdecho" 0)
(if (= (getvar "logfilemode") 0)
(progn
(setvar "logfilepath" "c:\\")
;; Place path location here. Replace the "c:\\" portion
;; with the desired path location. You will need to double
;; your slashes for Autolisp.
(setvar "logfilename" "filename")
;; Place log file name here. Replace "filename" with
;; desired filename with the extension.
(setvar "logfilemode" 1)
;; This turns logfilemode to on.
)
)
(setvar "cmdecho" cmde)
(setq cmde nil)
(princ)
)
(EL:RLF) ;; This will automatically run the routine.
(setq EL:RLF nil) ;; This will remove the routine from memory once executed

I named it EL:RLF to remove any hints to the user as to what this routine may do. But if this user is this knowledgable to discover this, you should be worried about their lack of knowledge to run AutoCAD. ;) EL stands for your initials (I believe). and RLF is for Restore Log File. I set the value of EL:RLF to nil as well so the casual user would not be able to discover the code as well. To rerun the log restoration just reload this file or restart your AutoCAD again if placed within the startup suite.

You will need to change the items in red to your desired settings. Remember also that the forward slashes within the path must either be replaced with a double forward slash (\\) or you could replace it with a single back slash (/).