I am hoping someone a lot smarter than me can help. (I hope I'm in the right forum too)
I have a customised lisp routine that works very well for us. It WBLOCK's a drawing and places it in a specified file. The only issue I am having is that there is a FILEDIA trigger in there, that sets the variable to 0. The lisp says it is supposed to set it back to 1, but alas...does not.
After each time the routine is run, the FILEDIA needs to be manually changed back to . Not a huge deal....but a pain
Any guidance?
I have attached the lisp routine (.lsp), and also the displays at the command line after the routine has run. It is the txt file.
Please and thanks for any help on this bug
Matt
It's trying to Save itself to its own filename, asking for confirmation to overwrite the existing file, and getting the Filedia command name as an answer, which it doesn't know what to do with. If you're saving it to itself, QSave is easier than Save, so you could change this:
(command ".save" "")
to this:
(command ".qsave")
Or you could answer its question:
(command ".save" "" "_yes")
Or you could give it a different file name to save to:
(command ".save" SomeOtherFilePathAndName)
Or you could change the Expert System Variable setting so it doesn't ask whether or not you want to replace the existing file.
HI Kent
I am not really sure what the .save command was actually trying to do anyway (saving the existing or the created drawing??), as earlier in the script a total new purged drawing is already created (in a specified folder.).
I just removed the reference to saving at all and set the filedia variable to 1
;(command "layer" "on" "*" "")
(command "filedia" 1)
(command "toolbar" "CustomHH.BurstPurgeOut" "Hide")
) ;_ end of defun C:HHQBLOCK
seems to work great now. A new flat purged drawing is placed in the separate folder and the existing drawing seems untouched. Unless I am missing something.
thanks very much
Matt
@matt_HH wrote:
....
I just removed the reference to saving at all and set the filedia variable to 1
....
(command "filedia" 1)
....
Since Filedia was set to 0 only just before that Save command, anyway, and you've removed that along with the Save, you no longer even need to set it back to 1 [provided it was set to 1 when you began].