Author Topic: need some ideas for a scrolling save message... (confusing i know)  (Read 1500 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
Code: [Select]
(defun c:nsave (/ activedoc docfullname backuppath archivename dwgbakk)
(vl-load-com)
(if (= (getvar "dwgtitled") 0)
 (PROGN
   (initdia)
   (command ".saveas")
 )
)
 
  (setq activedoc (vla-get-activedocument (vlax-get-acad-object)))
  ;;
(vla-save activedoc)
  (if (and (not (= 0 (strlen (setq docfullname (vla-get-fullname activedoc)))))
           (setq backuppath "C:\\ACADBACK\\")
           (setq archivename (strcat backuppath
                                     (vl-filename-base (vla-get-name activedoc))
                                     ".dwg"
                             )
           )
      )

    (setq dwgbakk (vl-file-copy docfullname archivename))
    (alert "Ooooops. Unable to get Filename.")
  )
  (if (= dwgbakk nil)
(progn
(vl-file-delete archivename)
(vl-file-copy docfullname archivename)
)
)
  (prompt (strcat "\n\nFile Saved..." archivename))
  (prompt (strcat "\n\nFile Saved..." docfullname))
  (princ)

)

here is my code for a custom save.
when "save" is clicked, it shows "file saved..."

if you click save over and over it, saves. but there is no way of it showing it saved again (it doesnt appear to scroll) unless you press f2 for the history window.

im looking for a way to have it display some type of scroll to show it saved again.

i hope this makes sense. and ideas are appreciated

ronjonp

  • Needs a day job
  • Posts: 7529
Re: need some ideas for a scrolling save message... (confusing i know)
« Reply #1 on: November 06, 2013, 03:30:27 PM »
You could use grtext to display: (grtext -2 (vla-get-fullname activedoc))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: need some ideas for a scrolling save message... (confusing i know)
« Reply #2 on: November 06, 2013, 04:36:47 PM »
Just a question:
After using
Code: [Select]
(vla-save activedoc)Can
Code: [Select]
(vla-get-fullname activedoc)Ever return an empty string?