PDA

View Full Version : ? Auto Save Off ?



JeffClark
2010-07-07, 01:19 PM
Something keeps turning my Auto Save off.
I have no idea what might be doing that.
I typically set Auto Save for 5 minutes, my drawings are small and it does not slow me down.
I have never written that into any Lisp routines (like Attdia for example) so I don't think it's any of My customization that's doing it.
2006 Map.
Any ideas as to what could dissable Auto Save from within?
Thanks guys,
Jeff

irneb
2010-07-07, 01:47 PM
Does it happen every single time you open a drawing, or only when acad gets started? Or does it only happen sometimes?

The reason I'm asking is it might either be something which changes the variable at startup or open, or it could be a command which fails to reset it after it finishes.

mvsawyer
2010-07-07, 02:17 PM
I noticed this when I was running AC05. I added this line in acaddoc.lsp so that autosave is set at the open of each drawing. Never had a problem after that.


(setvar "savetime" 5)

JeffClark
2010-07-07, 02:26 PM
90% pf the time, when I check it, it's off.

Due to your questions, I did some testing.
Made sure it was on.
I closed my drawing, leaving me in drawing1.dwg - still on.
Exited Map. Opened Map. Still on.
Opened my drawing. Still on.
Exited Map.
Opened 2006 LDT. LDT Auto Save was on, set to 10 minutes.
Exited LDT.
Opened Map, still on.

So, it does not seem to be anything in the open/close processes of the program, my customizations (which are rather extensive), or the drawings themselves, but like I said, usually when I check it (like after a crash), it's off. :cry:

JeffClark
2010-07-07, 02:29 PM
(setvar "savetime" 5)
Sweet! Thats a definate "work around" solution.:p

irneb
2010-07-07, 02:37 PM
You could create a vlr-sysvar-reactor to check when savetime gets changed. Let it do something "spectacular" like open the text screen ... I wouldn't use an alert inside a reactor. Then at least you can try to figure out what you used last, and this may be the cause of the setting being changed. As an example try this code:
;; Clear reactors
(setq rlst (vlr-reactors))
(foreach item rlst
(foreach ro (cdr item)
(if (= "TEST" (vlr-data ro))
(vlr-remove ro)
) ;_ end of if
) ;_ end of foreach
) ;_ end of foreach

(defun R:TestSysvarSaveTime (obj info / )
(cond
((= (strcase (car info)) "SAVETIME")
(textscr)
(princ "The sysvar changed: ")
(princ info)
)
)
(princ)
)

(VLR-Reaction-Set (vlr-sysvar-reactor "TEST") :vlr-sysVarChanged 'R:TestSysvarSaveTime)

JeffClark
2010-07-07, 02:55 PM
This is good Irneb, but you're programming skills are a little over my head, so I need a little more info.
I'm an old hand, so my customization involves a ACAD.LSp file. Should I put this code into it, or somewhere else?
Also, I'm a dual screen guy, so the Text Screen is always open, if that matters.
And Thanks for your help with this. Kinda cool communicating half way around the world ain't it.....:p

irneb
2010-07-07, 03:12 PM
Yep, you can place it in either ACAD.LSP / ACADDOC.LSP. Or anywhere you like. You could even copy-n-paste to the command line (just remove the comments though) so you can "turn it on" whenever you like.

You "may" also need to add a line to have the Visual Lisp Extensions loaded. Either one of the following:
(vl-load-com) ;Load all VLisp functions
(vl-load-reactors) ;Load only the VLisp reactor functionsI usually don't need to do this since it's already in my ACAD.LSP - due to other stuff. Keep on forgetting not everyone would have this.

You could change to an (alert "Message") instead ... but this is going to wait for you to click the OK button. And it's not a good idea to wait for user input inside a reactor.

It is quite cool "talking" to someone several thousand miles away! Sorry you guys didn't do too well in the football! Edit ... sorry soccer, you usually use "footbal" for something else don't you?

rkmcswain
2010-07-07, 05:18 PM
I agree with irneb - use the reactor to figure out where the problem lies, rather than just "fix it" with brute force.

Having said that, I have a slightly different version that will automatically set SAVETIME to your preferred setting each time it's changed, whether you know what is changing it or not. See link below.

http://cadpanacea.com/node/53

JeffClark
2010-07-07, 06:02 PM
Thanks Guys
Irneb - I have your code loaded in my ACAD.lsp. I'm looking forward to see what happens.
RK - I read your article, exactly! Bookmarked it.

Football, soccer.......NASCAR! - everything else is just a game.